.knowledge-story .story-stage {
  display: block;
  padding: 0;
  overflow: hidden;
}

.knowledge-story .knowledge-caption,
.knowledge-story .knowledge-disclosure {
  position: absolute;
  z-index: 5;
  left: 32px;
  margin: 0;
  color: #41413D;
}

.knowledge-story .knowledge-caption {
  top: 16px;
  font-size: 14px;
  font-weight: 560;
  line-height: 20px;
}

.knowledge-story .knowledge-disclosure {
  top: 532px;
  color: #62625D;
  font-size: 12px;
  line-height: 16px;
}

.knowledge-story .knowledge-browser {
  position: absolute;
  top: 48px;
  left: 32px;
  width: 672px;
  height: 472px;
  overflow: hidden;
  border: 1px solid #E8E8E5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(35,33,24,.12);
  color: #171717;
}

.knowledge-story .knowledge-chrome {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 14px;
  padding: 0 13px;
  border-bottom: 1px solid #EDEDEA;
  background: #FAFAF8;
  color: #62625D;
  font-size: 12px;
  line-height: 20px;
}

.knowledge-story .knowledge-window-dots { display: flex; gap: 5px; }
.knowledge-story .knowledge-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #D8D8D3; }

.knowledge-story .knowledge-aperture {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  background: #fff;
}

.knowledge-story .knowledge-document-lens {
  position: absolute;
  inset: 0;
  padding: 12px 24px 0;
  background: #fff;
  opacity: 1;
  visibility: visible;
}

.knowledge-story .knowledge-document-title {
  height: 30px;
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 560;
  line-height: 30px;
  letter-spacing: -.4px;
}

.knowledge-story .knowledge-toolbar {
  display: flex;
  width: 624px;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  color: #62625D;
  font-size: 12px;
  line-height: 18px;
}

.knowledge-story .knowledge-toolbar-state { min-width: 0; }
.knowledge-story .knowledge-toolbar-actions { position: relative; width: 206px; height: 44px; flex: none; }

.knowledge-story .knowledge-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #EDEDEA;
  border-radius: 999px;
  background: #F0F0EC;
  color: #41413D;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.knowledge-story .knowledge-toolbar-actions .knowledge-action { position: absolute; top: 4px; }
.knowledge-story .knowledge-save { background: #171717; border-color: #171717; color: #fff; }
.knowledge-story .knowledge-toolbar-actions .knowledge-cancel { right: 116px; width: 78px; visibility: hidden; }
.knowledge-story .knowledge-toolbar-actions .knowledge-save { right: 0; width: 108px; visibility: hidden; }
.knowledge-story .knowledge-toolbar-actions .knowledge-edit { right: 0; }
.knowledge-story .knowledge-save[data-saving="true"] { opacity: .72; }
.knowledge-story .knowledge-edit { padding-inline: 14px; }

.knowledge-story .knowledge-editor-wrap {
  position: relative;
  width: 624px;
  height: 238px;
}

.knowledge-story .knowledge-editor {
  display: block;
  box-sizing: border-box;
  width: 624px;
  height: 238px;
  min-height: 0;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  resize: none;
  border: 1px solid #E8E8E5;
  border-radius: 16px;
  outline: 0;
  background: #fff;
  color: #171717;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.knowledge-story .knowledge-caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 18px;
  background: #171717;
  opacity: 0;
  pointer-events: none;
}

.knowledge-story .knowledge-footer {
  display: flex;
  width: 624px;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid #EDEDEA;
  color: #62625D;
  font-size: 12px;
  line-height: 18px;
}

.knowledge-story .knowledge-test-action { min-height: 40px; padding-inline: 14px; font-size: 13px; }
.knowledge-story .knowledge-test-action b { font-size: 18px; font-weight: 400; line-height: 1; }
.knowledge-story .knowledge-test-action[data-disabled="true"] { opacity: .55; }

.knowledge-story .knowledge-fine-print,
.knowledge-story .knowledge-feedback {
  width: 624px;
  margin: 2px 0 0;
  color: #62625D;
  font-size: 12px;
  line-height: 18px;
}

.knowledge-story .knowledge-feedback[data-kind="success"] { color: #427D2C; }
.knowledge-story .knowledge-feedback[hidden],
.knowledge-story .knowledge-fine-print[hidden] { display: none !important; }

.knowledge-story .knowledge-manager-lens {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
}

.knowledge-story .knowledge-manager-lens[hidden] { display: none !important; }

.knowledge-story .knowledge-manager-panel {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 640px;
  height: 416px;
  overflow: visible;
  border: 1px solid #EDEDEA;
  border-radius: 20px;
  background: #FAFAF8;
}

.knowledge-story .knowledge-manager-header {
  position: absolute;
  top: 0;
  left: 8px;
  display: flex;
  width: 624px;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #EDEDEA;
}

.knowledge-story .knowledge-manager-header > div { min-width: 0; }
.knowledge-story .knowledge-manager-header p { margin: 0 0 1px; color: #62625D; font-size: 12px; line-height: 18px; }
.knowledge-story .knowledge-manager-header h4 { margin: 0; font-family: inherit; font-size: 20px; font-weight: 560; line-height: 26px; letter-spacing: -.25px; white-space: nowrap; }

.knowledge-story .knowledge-test-badge {
  display: inline-flex;
  min-height: 28px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  background: #F0F0EC;
  color: #62625D;
  font-size: 12px;
  line-height: 18px;
}

.knowledge-story .knowledge-test-badge i { font-size: 11px; font-style: normal; }

.knowledge-story .knowledge-messages {
  position: absolute;
  top: 52px;
  left: 8px;
  display: flex;
  width: 624px;
  height: 250px;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  overflow: hidden;
}

.knowledge-story .knowledge-messages-label { flex: none; margin: 0 0 2px; color: #62625D; font-size: 12px; line-height: 18px; text-align: center; }

.knowledge-story .knowledge-message,
.knowledge-story .knowledge-thinking {
  display: grid;
  width: fit-content;
  max-width: 100%;
  flex: none;
  gap: 2px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 20px;
  opacity: 1;
}

.knowledge-story .knowledge-message > span,
.knowledge-story .knowledge-thinking > span { color: inherit; font-size: 12px; font-weight: 560; line-height: 16px; }
.knowledge-story .knowledge-message p { max-width: 100%; margin: 0; font-size: 18px; font-weight: 400; line-height: 26px; overflow-wrap: anywhere; }
.knowledge-story .knowledge-message-assistant { align-self: flex-start; background: #F0F0EC; color: #171717; }
.knowledge-story .knowledge-message-user { align-self: flex-end; background: #4265EE; color: #fff; }

.knowledge-story .knowledge-thinking {
  display: flex;
  min-height: 34px;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  padding: 6px 12px;
  background: #F0F0EC;
  color: #62625D;
}

.knowledge-story .knowledge-thinking > span { margin-right: 3px; }
.knowledge-story .knowledge-thinking > i { width: 5px; height: 5px; border-radius: 50%; background: #73736D; }
.knowledge-story [data-knowledge-question][aria-hidden="true"],
.knowledge-story [data-knowledge-answer][aria-hidden="true"],
.knowledge-story [data-knowledge-thinking][aria-hidden="true"] { display: none; }

.knowledge-story .knowledge-composer {
  position: absolute;
  top: 314px;
  left: 8px;
  display: flex;
  width: 624px;
  height: 64px;
  align-items: center;
  gap: 2px;
  padding: 7px 8px 7px 18px;
  border: 1px solid #E6E6E6;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  color: #62625D;
  font-size: 16px;
  line-height: 24px;
}

.knowledge-story .knowledge-composer[data-focused="true"] { border-color: #B8B8B0; }
.knowledge-story [data-knowledge-input] { min-width: 0; overflow: hidden; white-space: nowrap; }
.knowledge-story .knowledge-composer-caret { width: 1px; height: 18px; flex: none; background: #171717; opacity: 0; }
.knowledge-story .knowledge-send { display: grid; width: 46px; height: 46px; flex: none; place-items: center; margin-left: auto; border-radius: 50%; background: #171717; color: #fff; font-size: 22px; line-height: 1; }

.knowledge-story .knowledge-safety { position: absolute; top: 385px; left: 8px; width: 624px; margin: 0; color: #62625D; font-size: 12px; line-height: 18px; }
.knowledge-story .knowledge-pointer { position: absolute; z-index: 6; top: 0; left: 0; width: 26px; height: 30px; opacity: 0; pointer-events: none; }
.knowledge-story .knowledge-click-halo { position: absolute; z-index: 5; top: 0; left: 0; width: 32px; height: 32px; border: 1px solid rgba(23,23,23,.32); border-radius: 50%; opacity: 0; pointer-events: none; }
.knowledge-story .knowledge-story-summary { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.knowledge-story .knowledge-controls[hidden] { display: none !important; }
.knowledge-story .knowledge-controls:not([hidden]) { display: flex; }
.knowledge-story .knowledge-controls button { min-width: 96px; min-height: 44px; }
.knowledge-story .knowledge-controls button:focus-visible { outline: 2px solid #4265EE; outline-offset: 3px; }

/* Phone and tablet reflow for the document and test scenes. */
@media (max-width: 1000px) {
  .story-row[data-story="knowledge"].knowledge-story .story-stage { display:block; width:100%; height:480px; min-height:420px; padding:0; overflow:hidden; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-caption { top:8px; left:10px; right:10px; font-size:12px; line-height:16px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-browser { top:32px; left:8px; width:calc(100% - 16px); height:386px; border-radius:16px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-chrome { height:30px; gap:8px; padding-inline:9px; font-size:11px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-aperture { width:100%; height:354px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-document-lens { padding:10px 10px 0; overflow:auto; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-document-title { height:auto; margin-bottom:4px; font-size:20px; line-height:26px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar { width:100%; height:44px; gap:4px; margin-bottom:3px; font-size:11px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar-state { flex:1; overflow-wrap:anywhere; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar-actions { width:132px; height:40px; flex:none; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar-actions .knowledge-edit { padding-inline:8px; font-size:11px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar-actions .knowledge-cancel { right:72px; width:64px; padding-inline:4px; font-size:11px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-toolbar-actions .knowledge-save { width:68px; padding-inline:4px; font-size:11px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-editor-wrap,
  .story-row[data-story="knowledge"].knowledge-story .knowledge-editor { width:100%; height:176px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-editor { padding:10px; overflow:auto; font-size:14px; line-height:20px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-footer { width:100%; height:auto; min-height:44px; gap:6px; margin-top:6px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-test-action { min-height:40px; padding-inline:8px; font-size:11px; white-space:normal; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-fine-print,
  .story-row[data-story="knowledge"].knowledge-story .knowledge-feedback { width:100%; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-manager-panel { top:6px; left:6px; display:flex; width:calc(100% - 12px); height:calc(100% - 12px); flex-direction:column; overflow:hidden; padding:8px; border-radius:16px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-manager-header { position:relative; inset:auto; display:flex; width:100%; height:60px; min-height:60px; flex:none; gap:6px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-manager-header h4 { font-size:16px; line-height:20px; white-space:normal; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-messages { position:relative; inset:auto; display:flex; width:100%; height:auto; min-height:0; flex:1 1 auto; gap:6px; padding:8px 0; overflow:auto; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-message p { font-size:16px; line-height:22px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-composer { position:relative; inset:auto; width:100%; height:52px; min-height:52px; flex:none; margin:4px 0 0; padding:5px 6px 5px 10px; font-size:13px; line-height:18px; }
  .story-row[data-story="knowledge"].knowledge-story [data-knowledge-input] { white-space:normal; overflow-wrap:anywhere; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-send { width:40px; height:40px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-safety { position:relative; inset:auto; width:100%; flex:none; margin:4px 0 0; font-size:11px; line-height:14px; }
  .story-row[data-story="knowledge"].knowledge-story .knowledge-disclosure { top:auto; bottom:8px; left:10px; right:10px; font-size:11px; line-height:14px; }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-story .knowledge-pointer,
  .knowledge-story .knowledge-click-halo { display: none !important; }
}
