[hidden] { display: none !important; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

#maya .brain-intro-copy { width: min(43vw, 640px); }
#maya h1 { font-size: clamp(2.8rem, 4.7vw, 5.35rem); }
#maya .title-second { margin-left: clamp(8px, 2.8vw, 40px); }
#maya .eyebrow { font-size: .94rem; }
.maya-scene {
  position: absolute;
  inset: 4% 2.5% 3% auto;
  width: 54%;
  isolation: isolate;
}
.maya-scene .surface-grid { top: 41%; height: 60%; }
.maya-figure { position: absolute; inset: 2% 0 0 33%; margin: 0; }
.maya-figure .baseplate { inset: auto 5% 9% 7%; height: 13%; }
.maya-portrait {
  position: absolute;
  inset: 0 -2% 13%;
  display: grid;
  place-items: end center;
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse 52% 62% at 50% 51%, #000 78%, transparent 100%);
}
.maya-portrait img { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center bottom; }
[data-theme="dark"] .maya-portrait { mix-blend-mode: normal; }
[data-theme="dark"] .maya-figure .baseplate { background: linear-gradient(#50565a, #2b3033); border-color: #565e65; box-shadow: 0 7px #262a2d, 0 22px 32px #0005; }
.maya-figure .agent-credit {
  right: 8%;
  bottom: 5.5%;
  gap: 5px;
  border-radius: 19px;
  padding: 12px 19px;
  color: var(--ink);
}
.maya-figure strong { font-size: clamp(1.45rem, 2.45vw, 2.5rem); line-height: 1; letter-spacing: -.045em; }
.maya-figure figcaption span { font-size: .86rem; font-weight: 600; color: var(--muted); }
.maya-orbit {
  position: absolute;
  inset: 17% 9% 12% 2%;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: rotate(-14deg);
}
.maya-orbit i { grid-area: 1 / 1; width: 100%; height: 95%; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 50%; }
.maya-orbit i:nth-child(2) { width: 79%; height: 76%; }
.maya-orbit i:nth-child(3) { width: 57%; height: 57%; }
.maya-sources {
  position: absolute;
  inset: 18% 51% 23% 3%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
  margin: 0;
  padding: 0;
  list-style: none;
}
.maya-sources li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: .875rem;
}
.maya-sources li:nth-child(1) { margin-left: 14%; }
.maya-sources li:nth-child(3) { margin-left: 20%; }
.source-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(38px, 3.8vw, 56px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--glass-edge);
  background: var(--surface);
  box-shadow: inset 0 1px var(--glass-rim), 0 8px 24px #22372b12;
}
.source-icon img { width: 65%; height: 65%; object-fit: contain; }
.source-label-short { display: none; }

.case-tabs {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 35px);
  border-bottom: 1px solid var(--detail-edge);
}
.case-tabs button {
  padding: 10px 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 650;
}
.case-tabs button:hover, .case-tabs button[aria-selected="true"] { color: var(--green); }
.case-tabs button[aria-selected="true"] { border-bottom-color: var(--green); }
.case-tabs button:focus-visible { outline-offset: -3px; }
.maya-opening {
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(24px, 4vw, 70px);
  min-height: 0;
  padding-block: clamp(44px, 6vw, 94px);
  background: radial-gradient(ellipse at 72% 50%, var(--surface), transparent 75%), var(--surface-soft);
}
.maya-opening .opening-copy { justify-self: start; }
.maya-opening h2 { font-size: clamp(2rem, 3.75vw, 4rem); }
.maya-opening .case-note { font-size: clamp(1.75rem, 3.4vw, 2.85rem); }
.maya-opening .lead { margin-bottom: 24px; }

/* Maneta Talk uses the original window and message structure from marketing-livechat. */
.chat-slot { display: grid; min-width: 0; min-height: 480px; align-items: center; }
#chat-window {
  width: 100%;
  height: clamp(490px, 44vw, 565px);
  --window-rail-width: 49px;
  --window-titlebar-height: 34px;
  --window-control-width: 30px;
  --window-control-height: 29px;
  --window-chrome-radius: 24px;
  color: var(--demo-window-ink);
}
#chat-window .invisible-window__glass-edge {
  border-radius: var(--window-chrome-radius);
  box-shadow: inset 0 1px var(--glass-rim), 0 16px 44px #27425526;
}
#chat-window .invisible-window__titlebar { cursor: default; touch-action: auto; align-items: center; }
.chat-titlebar-label { font-size: .85rem; font-weight: 650; color: var(--hero-sub); padding-inline-start: 10px; }
#chat-window .invisible-window__identity img { width: 31px; height: 31px; object-fit: contain; }
#chat-window .active-chat {
  display: grid;
  grid-template-columns: minmax(118px, .37fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--demo-window-page);
}
.agent-profile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-right: 1px solid var(--detail-edge);
  background: radial-gradient(ellipse at 54% 24%, #e0e9df, #adc3b5 62%, #446255);
}
.agent-portrait { position: absolute; inset: 0; z-index: -2; mix-blend-mode: multiply; }
.agent-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.agent-profile::after { content: ""; position: absolute; inset: 43% 0 0; z-index: -1; background: linear-gradient(transparent, #18322dee 95%); }
.agent-identity { padding: 14px; color: #fff; }
.agent-identity strong { font-size: clamp(1.65rem, 3.1vw, 3.3rem); line-height: 1; letter-spacing: -.07em; }
.agent-identity p { margin: 7px 0 0; font-size: .82rem; line-height: 1.4; color: #edf5ef; }
.thread { display: grid; min-width: 0; min-height: 0; grid-template-rows: 62px minmax(0, 1fr) auto; }
.contact { display: flex; align-items: center; gap: 9px; padding: 0 13px; border-bottom: 1px solid var(--detail-edge); }
.contact strong { display: block; font-size: .9rem; line-height: 1.3; }
.contact p { margin: 2px 0 0; color: var(--demo-window-muted); font-size: .8rem; line-height: 1.25; }
.chat-demo-label { margin-left: auto; color: var(--demo-window-muted); font-size: .79rem; }
.message-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--detail-edge); }
.contact .message-avatar { width: 36px; height: 36px; }
.maya-avatar { background: #eef2ef url("/templates/tricoma_2026/assets/rooms/media/maya-d2b96c65c98f.png") 51% 10% / 310% auto no-repeat; }
.transcript {
  min-height: 0;
  overflow: auto;
  padding: 14px 14px 7px;
  overscroll-behavior: contain;
  background: radial-gradient(ellipse at 0 100%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 58%), var(--demo-window-page);
}
.transcript:focus-visible { outline-offset: -2px; }
.message { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 14px; --bubble-fill: #f0f5ea; --bubble-edge: #dce7d5; }
.message .message-avatar { margin-top: 18px; }
.message-content { min-width: 0; max-width: calc(100% - 41px); display: grid; justify-items: start; gap: 4px; }
.message-content strong { font-size: .8rem; font-weight: 650; color: var(--demo-window-muted); }
.message-content > p {
  position: relative;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--bubble-edge);
  border-radius: 5px 15px 15px;
  background: var(--bubble-fill);
  font-size: .875rem;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.user { justify-content: flex-end; --bubble-fill: #edf3f5; --bubble-edge: #dbe5eb; }
.message.user .message-content { justify-items: end; }
.message.user .message-content > p { border-radius: 15px 5px 15px 15px; }
.user-avatar { display: grid; place-items: center; background: var(--demo-window-soft); font-size: .73rem; color: var(--demo-window-muted); }
[data-theme="dark"] .message { --bubble-fill: #29362a; --bubble-edge: #3c4c3a; }
[data-theme="dark"] .message.user { --bubble-fill: #29353c; --bubble-edge: #43515c; }
.chat-file {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  gap: 1px 7px;
  max-width: 100%;
  border: 1px solid var(--detail-edge);
  border-radius: 9px;
  padding: 7px 9px;
  background: var(--demo-window-page);
  color: var(--ink);
  text-align: left;
  line-height: 1.3;
}
.chat-file:hover { border-color: var(--green); }
.chat-file img { grid-row: span 2; width: 23px; height: 23px; object-fit: contain; }
.chat-file b { font-size: .85rem; overflow-wrap: anywhere; }
.chat-file span { color: var(--demo-window-muted); font-size: .75rem; }
.chat-outputs { display: grid; gap: 5px; max-width: 100%; }
.chat-team { max-width: 100%; font-size: .83rem; line-height: 1.45; }
.chat-team summary { padding: 3px 2px; color: var(--green); font-weight: 650; cursor: pointer; }
.chat-team summary:hover { text-decoration: underline; }
.chat-team ol { margin: 3px 0 4px; padding: 0 0 0 10px; border-left: 1px solid var(--detail-edge); list-style: none; }
.chat-team li + li { margin-top: 7px; }
.chat-team li span { display: block; color: var(--demo-window-muted); }
.chat-team li .chat-team-result { color: var(--demo-window-ink); }
.composition { border-top: 1px solid var(--detail-edge); padding: 7px 10px 10px; background: var(--demo-window-page); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-bottom: 6px; }
.chat-suggestions button { background: transparent; border: 0; padding: 3px 2px; color: var(--green); font-size: .8rem; font-weight: 650; text-align: left; }
.chat-suggestions button:hover { text-decoration: underline; text-underline-offset: 3px; }
.composition form { display: flex; align-items: flex-end; gap: 5px; padding: 6px; border: 1px solid var(--detail-edge); border-radius: 12px; }
.composition form:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 20%, transparent); }
#message { width: 100%; min-width: 0; min-height: 33px; max-height: 88px; resize: none; padding: 6px; border: 0; outline: 0; background: transparent; color: inherit; font-size: 1rem; line-height: 1.3; }
#send { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--green); color: var(--surface); font-size: 1.2rem; line-height: 1; }
#send:disabled { background: var(--demo-window-soft); color: var(--demo-window-muted); border: 1px solid var(--detail-edge); cursor: default; }
.reopen { justify-self: center; }
.reopen img { width: 24px; height: 24px; }
.expanded-chat { width: min(calc(100% - 30px), 1120px); max-width: none; height: min(calc(100% - 30px), 750px); max-height: none; border: 0; padding: 0; background: transparent; overflow: visible; }
.expanded-chat #chat-window { height: 100%; }
.expanded-chat .message-content { max-width: min(90%, 530px); }
dialog::backdrop { background: #131d21a1; backdrop-filter: blur(4px); }
.file-preview { width: min(calc(100% - 28px), 630px); max-height: calc(var(--tri-room-viewport-height, 100vh) * 0.88); padding: 0; border: 1px solid var(--detail-edge); border-radius: 18px; background: var(--surface); color: var(--ink); }
.file-preview header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--detail-edge); background: var(--surface-soft); }
.file-preview header p { flex: 1; margin: 0; color: var(--muted); font-size: .875rem; }
.file-close { width: 38px; height: 38px; padding: 0; font-size: 1.5rem; line-height: 1; border-radius: 50%; border: 1px solid var(--detail-edge); background: var(--surface); color: var(--ink); }
.file-body { padding: clamp(20px, 4vw, 40px); }
.file-body h2 { font-size: clamp(1.65rem, 4vw, 2.55rem); }
.file-body dl { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 6px 15px; padding-block: 15px; border-block: 1px solid var(--detail-edge); }
.file-body dt { color: var(--muted); }
.file-body dd { margin: 0; overflow-wrap: anywhere; }
#file-excerpt { margin: 19px 0 0; white-space: pre-wrap; }
room-body:has(dialog[open]) { overflow: hidden; }

.maya-team {
  padding-block: clamp(58px, 8vw, 106px);
  border-top: 1px solid var(--detail-edge);
  background: radial-gradient(ellipse at 50% 25%, var(--front-glow), transparent 56%), var(--surface);
}
.team-copy { max-width: 820px; margin-inline: auto; text-align: center; }
.team-copy .eyebrow { justify-content: center; }
.team-copy .title-second { margin-left: 0; }
.team-copy .lead { max-width: 680px; margin: 0 auto; }
.team-ensemble {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: clamp(0px, 1vw, 12px);
  align-items: end;
  margin: clamp(22px, 4vw, 42px) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.teammate a { display: block; padding-bottom: 5px; }
.teammate a:hover .team-role { text-decoration: underline; text-underline-offset: 4px; }
.team-portrait {
  width: 100%;
  height: clamp(135px, 22vw, 300px);
  object-fit: contain;
  object-position: center bottom;
  mask-image: linear-gradient(#000 78%, transparent);
}
.team-portrait-full {
  object-fit: cover;
  object-position: center 6%;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(#000 72%, transparent), linear-gradient(90deg, transparent, #000 13% 87%, transparent);
  mask-composite: intersect;
}
[data-theme="dark"] .team-portrait-full { mix-blend-mode: normal; }
.teammate-lead .team-portrait { height: clamp(160px, 26vw, 350px); }
.team-name {
  display: block;
  position: relative;
  margin-top: -.45em;
  color: var(--brand-ink);
  font: 400 clamp(1.9rem, 4vw, 4rem)/1.1 Peter, "Segoe Print", cursive;
  rotate: -6deg;
}
.team-role { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.teammate-lead .team-role { color: var(--green); font-weight: 700; }
.team-workflow {
  margin-top: clamp(28px, 6vw, 75px);
  padding-top: clamp(20px, 4vw, 42px);
  border-top: 1px solid var(--detail-edge);
}
.team-workflow > h3 { font-size: clamp(1.4rem, 2.5vw, 2.2rem); }
.maya-connection { min-height: 0; padding: clamp(56px, 8vw, 106px) 0; }
.sources-map { width: min(calc(100% - 40px), 810px); margin-top: clamp(24px, 4vw, 46px); text-align: left; }
.sources-map section { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--detail-edge); align-items: start; }
.sources-map section:first-child { border-top: 1px solid var(--detail-edge); }
.sources-map h3 { margin: 0 0 5px; }
.sources-map p { margin: 0; color: var(--muted); }
.story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 40px); margin: 36px 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--detail-edge); }
.story-steps li { position: relative; padding-top: 18px; }
.story-steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.story-steps :is(h3, h4) { margin: 4px 0 7px; font-size: 1.2rem; line-height: 1.3; }
.story-steps p { margin: 0; color: var(--muted); }

@media (min-width: 1121px) {
  #maya .title-second { font-size: .84em; white-space: nowrap; }
}
@media (max-width: 1120px) {
  .site-header nav { gap: 16px; }
  .site-header .brand b { max-width: 145px; white-space: normal; line-height: 1.15; }
  .maya-opening { grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); }
  #chat-window { --window-rail-width: 40px; }
  #chat-window .active-chat { grid-template-columns: minmax(96px, .31fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  #maya .brain-intro-copy { width: min(100%, 610px); }
  #maya h1 { font-size: clamp(2.45rem, 7.5vw, 4.4rem); }
  #maya .title-second { margin-left: 0; }
  #maya .eyebrow { justify-content: center; }
  .maya-scene { position: relative; inset: auto; width: min(100%, 650px); height: clamp(350px, 75vw, 480px); margin-inline: auto; }
  .maya-opening { grid-template-columns: minmax(0, 1fr); }
  .maya-opening .opening-copy { justify-self: center; text-align: center; }
  .maya-opening .lead { margin-inline: auto; }
  .chat-slot { width: min(100%, 720px); justify-self: center; }
  .site-header nav { display: none; }
}
@media (max-width: 640px) {
  .team-ensemble { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 9px; max-width: 435px; margin-inline: auto; }
  .teammate-lead { grid-row: 1; grid-column: 1 / -1; width: min(71%, 240px); justify-self: center; }
  .team-portrait { height: clamp(144px, 38vw, 206px); }
  .teammate-lead .team-portrait { height: clamp(162px, 44vw, 240px); }
  .story-steps { grid-template-columns: minmax(0, 1fr); border: 0; border-left: 1px solid var(--detail-edge); gap: 18px; padding-left: 17px; }
  .story-steps li { padding-top: 0; }
  .story-steps li::before { top: 9px; left: -22px; }
}
@media (max-width: 550px) {
  #maya .brain-intro-copy > p:not(.eyebrow) { font-size: 1rem; }
  .maya-scene { height: clamp(290px, 81vw, 380px); }
  .maya-sources li { gap: 6px; line-height: 1.25; font-size: .8rem; }
  .maya-sources li:nth-child(n) { margin-left: 0; }
  .source-label-full { display: none; }
  .source-label-short { display: inline; }
  .maya-figure { inset-inline-start: 39%; }
  .maya-figure .agent-credit { right: 2%; padding: 8px 11px; width: max-content; max-width: 100%; bottom: 2%; }
  .maya-figure figcaption span { font-size: .73rem; }
  .case-tabs { flex-wrap: wrap; gap: 0 4px; }
  .case-tabs button { padding: 9px 7px; font-size: .85rem; }
  .maya-opening { padding-inline: 12px; }
  .maya-opening .opening-copy { padding-inline: 6px; }
  .maya-opening .case-note { margin-bottom: 12px; }
  .maya-opening h2 .title-second { margin-left: 0; }
  .chat-slot { min-height: 450px; }
  #chat-window { height: clamp(455px, calc(var(--tri-room-viewport-height, 100vh) * 0.73), 555px); --window-rail-width: 0px; --window-titlebar-height: 31px; }
  #chat-window .invisible-window__rail, #chat-window .agent-profile { display: none; }
  #chat-window .active-chat { grid-template-columns: minmax(0, 1fr); }
  .chat-titlebar-label { padding-inline-start: 14px; }
  .transcript { padding-inline: 9px; }
  .source-icon { width: 32px; }
  .sources-map section { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
  .site-footer { align-items: flex-start; padding-inline: 17px; }
  .site-footer .brand b { display: none; }
}
@media (max-width: 440px) {
  .site-header .brand { min-width: 0; }
  .site-header .brand b { max-width: 128px; }
  .theme-switch { flex: none; width: 40px; height: 40px; justify-content: center; padding: 0; }
  .theme-switch .theme-label { display: none; }
}
