@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

* {
  box-sizing: border-box;
}

/* Global scrollbar styling - dark theme */
/* Webkit browsers (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: #0a0a0a;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  border: 2px solid #0a0a0a;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

*::-webkit-scrollbar-corner {
  background: #0a0a0a;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) #0a0a0a;
}

html, body {
  margin: 0;
  padding: 0;
}

/* Prevent scrolling on app pages */
body:not(.learn-more-page):not(.home-page):not(.projects-page) {
  height: 100%;
  overflow: hidden;
}

/* Learn-more page - allow scrolling */
body.learn-more-page {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Projects page - allow scrolling */
body.projects-page {
  overflow-y: auto;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 2rem;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Transparent nav on home page */
body.home-page .top-nav {
  position: absolute;
  background: transparent;
  border-bottom: none;
}

.logo {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-back-top {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  margin: 0;
}

.logo:hover {
  opacity: 0.7;
  }
  
  .hero {
    display: flex;
    align-items: center;
    justify-content: center;
  background: #0a0a0a;
    text-align: center;
  padding: 0 2rem;
  position: relative;
  min-height: 60vh;
  padding-top: 100px;
}

/* Home page hero - centered and positioned higher */
body.home-page .hero {
  min-height: 100vh;
  margin-top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  padding-bottom: 0;
}

/* Learn-more page hero - proper spacing */
body.learn-more-page .hero {
  min-height: 50vh;
  padding-top: 120px;
  padding-bottom: 4rem;
}

/* Why Telogence page - single page layout */
body.why-telogence-page {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.why-telogence-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 50px;
  padding-bottom: 0;
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
}

.why-telogence-header {
  text-align: center;
  padding: 0.5rem 1.5rem 0.25rem 1.5rem;
  flex-shrink: 0;
}

.why-telogence-header h1 {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 0.125rem 0;
  font-family: 'Inter', sans-serif;
}

.why-telogence-header p {
  font-size: 0.75rem;
  color: #a0a0a0;
  margin: 0;
  font-weight: 400;
  font-style: italic;
}

.why-telogence-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.375rem 0 1rem 0;
  flex-shrink: 0;
}

.why-telogence-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  position: relative;
  gap: 0.5rem;
}

.why-telogence-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 0;
  flex: 1 1 auto; /* Allow growing to fill available space */
  min-height: 0;
  padding: 0 1rem;
  position: relative;
  padding-top: 0.5rem;
  overflow-y: auto; /* Allow scrolling if content is too tall */
}

.why-telogence-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 33.333%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
  pointer-events: none;
}

.why-telogence-bottom::after {
  content: '';
  position: absolute;
  top: 0;
  left: 66.666%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
  pointer-events: none;
}

body.learn-more-page .hero h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Learn more page - pane navigation */
.learn-more-nav {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 999;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.learn-nav-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.learn-nav-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.learn-nav-btn.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.learn-pane {
  display: none;
  height: calc(100vh - 80px);
  margin-top: 80px;
  overflow-y: auto;
  padding: 0;
}

.learn-pane.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.learn-pane-content {
  max-width: 720px;
  width: 100%;
  padding: 4rem 3rem;
  text-align: center;
}

.learn-pane-content h1 {
  font-size: 4.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.learn-pane-content .tagline {
  font-size: 1.125rem;
  color: #a0a0a0;
  margin-bottom: 3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.learn-pane-content h2 {
  font-size: 2.5rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
}

.learn-pane-content .intro-text {
  text-align: left;
  margin-bottom: 3rem;
  color: #c0c0c0;
  font-size: 1.125rem;
}

.learn-pane-content .word-definition,
.learn-pane-content .combination {
  text-align: left;
  margin-bottom: 3rem;
}

.learn-pane-content .concept-box {
  text-align: left;
}

.learn-nav-arrows {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  gap: 1rem;
}

.nav-arrow {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero .content {
  max-width: 700px;
  }
  
  .hero h1 {
  font-size: 4.5rem;
  font-weight: 300;
    margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
  }
  
  .hero p {
  font-size: 1.125rem;
  color: #a0a0a0;
  margin-bottom: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  }
  
  .btn-primary {
    display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 0;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  transform: none;
}

.btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #a0a0a0;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 0;
  margin-left: 1rem;
}

.btn-secondary:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 3rem;
}

/* Learn-more page section spacing */
body.learn-more-page .section {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

.section h2 {
  margin-bottom: 3rem;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4rem;
  color: #6a6a6a;
  font-size: 0.875rem;
  letter-spacing: 0.3px;
}

/* Absolute footer on home page */
body.home-page .footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  margin-top: 0;
}

/* Learn-more page footer - normal flow */
body.learn-more-page .footer {
  position: relative;
  margin-top: 4rem;
}

body.why-telogence-page .footer {
  padding: 0.5rem 1.5rem;
  margin-top: 0;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.etymology-section {
  margin-bottom: 6rem;
}

.intro-text {
  font-size: 1.125rem;
  color: #b0b0b0;
  margin-bottom: 3rem;
  line-height: 1.7;
  font-weight: 400;
}

.word-definition {
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  margin-bottom: 4rem;
  padding-left: 2rem;
}

.word-definition h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
}

.pronunciation {
  font-size: 0.875rem;
  color: #808080;
  font-weight: 400;
  font-style: italic;
  margin-left: 0.5rem;
}

.word-definition .definition {
  line-height: 1.8;
  color: #c0c0c0;
  font-size: 1rem;
  font-weight: 400;
}

.combination {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  margin-top: 4rem;
  border-radius: 0;
}

.combination h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
}

.combination .definition {
  line-height: 1.8;
  font-size: 1rem;
  color: #c0c0c0;
  font-weight: 400;
}

.concept-section {
  margin-top: 6rem;
  margin-bottom: 4rem;
}

.concept-box {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 0;
  line-height: 1.8;
}

.concept-text {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #ffffff;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.concept-box p {
  color: #c0c0c0;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
}

.concept-box p:last-child {
  margin-bottom: 0;
}

.navigation {
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  flex-shrink: 0;
}

.why-telogence-page .navigation {
  margin-top: 0.5rem;
  padding: 0.5rem;
}

/* Nodes Flow Styles */
.nodes-container {
  flex: 0 1 auto; /* Allow shrinking but don't force expansion */
  position: relative;
  width: 100%;
  padding: 2rem 1rem;
  overflow: visible;
  box-sizing: border-box;
  min-height: 0;
}

.why-telogence-page .nodes-container {
  margin: 0;
  padding: 0.75rem 1rem;
  padding-bottom: 0; /* Will be set dynamically by JavaScript */
  padding-top: 1rem;
  margin-bottom: 0;
  overflow: visible;
  flex: 0 1 auto; /* Allow shrinking */
}

.nodes-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0 1.5rem 0;
  flex-wrap: nowrap;
  width: 100%;
  position: relative;
}

.why-telogence-page .nodes-flow {
  padding: 0.75rem 0 1.5rem 0;
}

/* Responsive: allow horizontal scroll on small screens */
@media (max-width: 1200px) {
  .why-telogence-page .nodes-container {
    overflow-x: auto;
  }
  
  .why-telogence-page .nodes-flow {
    min-width: 900px; /* Minimum width to prevent too much compression */
  }
}

.node {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 0;
  flex: 1 1 auto;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 100px;
  max-width: 100px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(0.875rem * 2 + 1em);
}

.why-telogence-page .node {
  min-width: 90px;
  max-width: 90px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.node:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  position: relative;
  min-width: 120px;
  max-width: 120px;
  justify-content: flex-start;
  align-self: center;
}

.node-wrapper > .node:first-child {
  flex: 0 0 auto;
  align-self: stretch;
  margin-bottom: 0;
}

.node-branch {
  margin-top: 2rem;
  flex: 0 0 auto;
  min-width: 120px;
  max-width: 120px;
}

.arrow-right {
  width: 30px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  position: relative;
  flex-shrink: 0;
  align-self: center;
  display: block;
}

.why-telogence-page .arrow-right {
  width: 35px;
}

.arrow-right::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(255, 255, 255, 0.6);
}

.arrow-down {
  width: 2px;
  height: 60px;
  background: rgba(255, 255, 255, 0.6);
  position: relative;
  margin-top: 0.5rem;
  display: block;
}

.arrow-down::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.6);
}

/* Pass boxes positioned below Screen and Discuss */
.pass-boxes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.pass-arrow-down {
  position: absolute;
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.6);
  /* Position will be set by JavaScript */
}

.pass-arrow-down::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.6);
}

.pass-box {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 0;
  min-width: 120px;
  max-width: 120px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(0.875rem * 2 + 1em);
  top: calc(8rem + 180px);
  /* Position will be set by JavaScript */
}

.why-telogence-page .pass-box {
  min-width: 90px;
  max-width: 90px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* Loop arrows container */
.loop-arrows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.loop-arrow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

/* Loop arrow lines - positions will be set by JavaScript */
.loop-line-up-1,
.loop-line-up-2 {
  position: absolute;
  width: 2px;
  height: 80px;
  background: rgba(255, 255, 255, 0.6);
  display: block;
}

.loop-line-left-1,
.loop-line-left-2 {
  position: absolute;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  display: block;
}

.loop-line-down-1,
.loop-line-down-2 {
  position: absolute;
  width: 2px;
  height: 80px;
  background: rgba(255, 255, 255, 0.6);
  display: block;
}

.loop-arrow-head-1,
.loop-arrow-head-2 {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.6);
  display: block;
}

/* Dig Deeper node on loop arrow */
.dig-deeper-node {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 0;
  min-width: 120px;
  max-width: 120px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(0.875rem * 2 + 1em);
  z-index: 2;
  pointer-events: none;
  /* Position will be set by JavaScript */
}

.why-telogence-page .dig-deeper-node {
  min-width: 90px;
  max-width: 90px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* Floating brackets */
.floating-brackets {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.bracket {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Position will be set by JavaScript */
}

.bracket-line {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
}

.bracket-line::before,
.bracket-line::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-right: none;
}

.bracket-line::before {
  left: -12px;
  top: -10px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.bracket-line::after {
  right: -12px;
  top: -10px;
  border-left: none;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.bracket-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Arrow numbers */
.arrow-numbers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.arrow-number {
  position: absolute;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 400;
  line-height: 1;
  /* Position will be set by JavaScript */
}

#arrow-asterisk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  background: transparent;
}

/* Stage Sections */
.stage-section {
  padding: 0.5rem 0.75rem 0.625rem 0.75rem;
}

.why-telogence-page .screening-stage {
  padding-right: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.why-telogence-page .define-questions-stage {
  padding-left: 1rem;
  padding-right: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.why-telogence-page .diligence-stage {
  padding-left: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.define-questions-core,
.define-questions-telogence {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.define-questions-core strong,
.define-questions-telogence strong {
  color: #ffffff;
  font-weight: 600;
}

.diligence-asterisk-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-right: 0.5rem;
  font-size: 0.875rem;
  color: #ffffff;
  vertical-align: middle;
  flex-shrink: 0;
  background: transparent;
}

.stage-heading {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
}

.stage-heading-with-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stage-heading-with-logo .stage-heading {
  margin-bottom: 0;
}

.telogence-logo-inline {
  display: flex;
  align-items: center;
}

.telogence-logo-inline .logo-text {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.stage-subtitle {
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 0.5rem;
  font-style: italic;
}

.stage-description {
  font-size: 0.75rem;
  color: #c0c0c0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.stage-explanation {
  font-size: 0.8125rem;
  color: #a0a0a0;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.screening-layers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.layer-section {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 0.75rem;
}

.layer-heading {
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 0.375rem 0;
  letter-spacing: 0.3px;
}

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.logo-item {
  font-size: 0.6875rem;
  color: #808080;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.tools-list {
  font-size: 0.8125rem;
  color: #a0a0a0;
  line-height: 1.5;
}

.tools-list p {
  margin: 0;
}

.diligence-core {
  font-size: 0.9375rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Value Propositions */
.value-props {
  margin-top: 0.5rem;
  position: relative;
}

.telogence-logo-bottom {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.telogence-logo-bottom .logo-text {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.value-props-heading {
  font-size: 0.75rem;
  color: #ffffff;
  margin-bottom: 0.375rem;
  font-weight: 400;
}

.value-prop-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: flex-start;
}

.value-prop-item:last-child {
  margin-bottom: 0;
}

.value-prop-number {
  font-size: 1rem;
  color: #ffffff;
  flex-shrink: 0;
  line-height: 1.2;
}

.value-prop-content {
  flex: 1;
}

.value-prop-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.value-prop-text {
  font-size: 0.75rem;
  color: #c0c0c0;
  line-height: 1.4;
  margin: 0;
}

.value-propositions {
  margin-top: 6rem;
}

.value-point {
  margin-bottom: 3rem;
  padding-left: 0;
}

.value-point:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 2rem;
}

.value-point h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

.value-point:not(:first-child) h3 {
  color: #c0c0c0;
  font-size: 1rem;
  font-weight: 400;
}

/* App Styles */
.app-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 3.5rem 0 2rem 0;
  height: calc(100vh - 50px);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  width: 100%;
  gap: 0;
}

.app-sidebar {
  width: 200px;
  min-width: 200px;
  background: rgba(10, 10, 10, 0.8);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.app-sidebar.collapsed {
  width: 50px;
  min-width: 50px;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  padding: 1rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.sidebar-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.app-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.app-header {
  text-align: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.app-header h1 {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.app-tagline {
  font-size: 1rem;
  color: #808080;
  margin: 0;
  letter-spacing: 0.5px;
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.input-section,
.question-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
}

.input-section h2,
.question-section h2 {
  font-size: 1.125rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

.input-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: #808080;
    padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: #ffffff;
}

.tab-btn.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.text-input,
.question-input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
  padding: 1rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.text-input:focus,
.question-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.text-input::placeholder,
.question-input::placeholder {
  color: #606060;
}

.upload-area {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 3rem 2rem;
  text-align: center;
  transition: border-color 0.3s ease;
}

.upload-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
}

.upload-label span:first-child {
  color: #ffffff;
  font-size: 0.9375rem;
}

.upload-hint {
  color: #606060;
  font-size: 0.8125rem;
}

.file-name {
  margin-top: 1rem;
  color: #a0a0a0;
  font-size: 0.875rem;
  display: none;
}

.ask-btn {
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  margin-top: 1rem;
}

.ask-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.ask-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.results-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  min-height: 600px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header h2 {
  font-size: 1.125rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.3px;
}

.results-count {
  color: #808080;
  font-size: 0.875rem;
  font-weight: 400;
}

.results-container {
  min-height: 400px;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #808080;
}

.empty-state p {
  margin: 0.5rem 0;
  font-size: 0.9375rem;
}

.empty-hint {
  color: #606060;
  font-size: 0.875rem;
}

.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #808080;
  font-size: 0.9375rem;
}

.result-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item:last-child {
  border-bottom: none;
}

.result-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  font-size: 0.875rem;
  font-weight: 400;
}

.result-content {
  flex: 1;
}

.result-content p {
  margin: 0;
  color: #c0c0c0;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.result-content mark {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.125rem 0.25rem;
}

.result-score {
  margin-top: 0.75rem;
  color: #808080;
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Plane Tabs */
.plane-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  overflow-y: auto;
}

.app-sidebar.collapsed .plane-tabs {
  overflow: visible;
}

.plane-tab {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid transparent;
  color: #808080;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
  text-align: left;
  width: 100%;
}

.app-sidebar.collapsed .plane-tab {
  padding: 1rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.plane-tab .tab-label {
  display: block;
}

.plane-tab .tab-short {
  display: none;
}

.app-sidebar.collapsed .plane-tab .tab-label {
  display: none;
}

.app-sidebar.collapsed .plane-tab .tab-short {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.plane-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.plane-tab.active {
  color: #ffffff;
  border-left-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.app-sidebar.collapsed .plane-tab.active {
  border-left-color: transparent;
  border-bottom-color: #ffffff;
}

.plane-content {
  display: none;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.plane-content.active {
  display: flex;
  flex-direction: column;
}

/* Knowledge Base Styles */
.knowledge-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.knowledge-sidebar {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.knowledge-sidebar h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.btn-add-doc {
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.btn-add-doc:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.documents-list {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.empty-docs {
  text-align: center;
  padding: 1rem;
  color: #808080;
}

.empty-docs p {
  margin: 0.25rem 0;
  font-size: 0.75rem;
}

.empty-hint {
  color: #606060;
  font-size: 0.6875rem;
}

.doc-item {
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.doc-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.doc-item.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.doc-item-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.doc-item-info {
  flex: 1;
  min-width: 0;
}

.doc-item-title {
  color: #ffffff;
  font-size: 0.75rem;
  margin-bottom: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.doc-item-meta {
  color: #808080;
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-main {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.knowledge-viewer {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.doc-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.doc-viewer-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.doc-viewer-file {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.doc-viewer-header h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
}

.btn-delete {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.doc-viewer-content {
  color: #c0c0c0;
  line-height: 1.8;
  font-size: 0.9375rem;
  white-space: pre-wrap;
}

.url-source-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.url-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.url-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
}

.url-link {
  color: rgba(100, 150, 255, 0.9);
  text-decoration: none;
  font-size: 0.9375rem;
  word-break: break-all;
  transition: color 0.2s ease;
}

.url-link:hover {
  color: rgba(100, 150, 255, 1);
  text-decoration: underline;
}

.doc-viewer-content .highlighted-line {
  background: rgba(96, 165, 250, 0.3);
  padding: 2px 4px;
  border-radius: 3px;
  display: inline-block;
  transition: background 0.3s ease;
  color: #ffffff;
}

.doc-viewer-content .highlighted-line-fade {
  background: rgba(96, 165, 250, 0.1);
  transition: background 2s ease;
}

.doc-viewer-file {
  margin-top: 2rem;
}

.pdf-preview-container {
  width: 100%;
  max-height: 800px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
  padding: 1rem;
}

.pdf-loading {
  text-align: center;
  padding: 3rem;
  color: #808080;
}

.pdf-page-canvas {
  display: block;
  margin: 0 auto 1rem auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-preview-notice {
  padding: 3rem 2rem;
  text-align: center;
  color: #808080;
}

.file-preview-notice p {
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.file-preview-hint {
  color: #606060;
  font-size: 0.875rem;
}

/* Working Area LLM Styles */
.working-llm-section {
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.llm-loading {
  padding: 2rem;
  text-align: center;
  color: #808080;
}

.llm-summary {
  color: #c0c0c0;
  line-height: 1.8;
  font-size: 0.9375rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.citation-link {
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.citation-link:hover {
  color: #808080;
}

.source-lines {
  color: #808080;
  font-size: 0.8125rem;
  margin-left: auto;
}

.llm-note {
  padding: 1.5rem;
  color: #a0a0a0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.llm-note p {
  margin: 0.5rem 0;
}

.llm-note .empty-hint {
  font-size: 0.875rem;
  color: #808080;
  margin-top: 0.75rem;
}

.llm-error {
  padding: 2rem;
  text-align: center;
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
  background: rgba(255, 107, 107, 0.05);
}

.sources-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Diligence Styles */
.threshold-issues-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  padding: 0;
}

.diligence-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.diligence-tree {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.5);
  z-index: 10;
  position: relative;
  min-height: 40px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: #808080;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn.map-btn {
  color: #ffffff;
}

.toggle-btn.map-btn svg {
  width: 14px;
  height: 14px;
}

.toggle-btn:last-child {
  border-right: none;
}

.toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.toggle-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.tree-header h2 {
  font-size: 0.875rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
}

.btn-add-question {
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

.btn-add-question:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.questions-tree {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  position: relative;
  background: #0a0a0a;
  width: 100%;
  height: 100%;
}

.questions-tree:not(.whiteboard) {
  overflow-y: auto;
  padding: 1rem 2rem;
}

.questions-tree.whiteboard {
  cursor: grab;
  user-select: none;
}

.questions-tree.whiteboard.panning {
  cursor: grabbing;
}

.tree-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.tree-connections {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.connection-line {
  transition: stroke 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
}

.connection-line:hover {
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 2;
}

.tree-nodes {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.tree-nodes .question-node {
  pointer-events: auto;
}

.question-node {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.question-node.visual-node {
  margin-bottom: 0;
  border-left: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.8);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-node.visual-node.root-node {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
  position: relative;
}

.threshold-node-indicator {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
}

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

.question-node:hover {
  border-left-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.question-node.visual-node:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.question-node.answered {
  opacity: 0.6;
}

.question-node.decision {
  border-left-color: rgba(255, 255, 255, 0.3);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.question-node.visual-node .question-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.question-node.visual-node .question-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}

.question-text {
  color: #ffffff;
  font-size: 0.9375rem;
  cursor: pointer;
  flex: 1;
}

.question-node.visual-node .question-text {
  font-size: 0.875rem;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.5rem;
}

.question-text:hover {
  color: #e0e0e0;
}

.question-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-add-sub,
.btn-answer,
.btn-edit,
.btn-delete-q,
.btn-reopen {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.btn-add-sub:hover,
.btn-answer:hover,
.btn-edit:hover,
.btn-reopen:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-delete-q:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
}

.sub-questions {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.diligence-detail {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.question-detail {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.question-detail-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.question-detail-header h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.question-status {
  display: flex;
  gap: 0.5rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid;
}

.status-badge.pending {
  color: #808080;
  border-color: rgba(255, 255, 255, 0.1);
}

.status-badge.answered {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

.status-badge.decision {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.status-badge.small {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}

.question-actions-panel {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
}

.relevant-documents {
  margin-bottom: 2rem;
}

.relevant-documents h3 {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1rem;
}

.doc-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.doc-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.doc-card-title {
  color: #ffffff;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.doc-card-preview {
  color: #808080;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.sub-questions-list {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-questions-list h3 {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1rem;
}

.sub-questions-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-question-item {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-question-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.sub-question-item span:first-child {
  color: #c0c0c0;
  font-size: 0.9375rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #808080;
  font-size: 1.5rem;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 2rem;
}

.modal-input,
.modal-textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
  resize: vertical;
}

.modal-input:focus,
.modal-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.modal-textarea {
  min-height: 200px;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* Working Area Styles */
.working-area-container {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.working-area-content {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.working-area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.5);
}

.working-question-small {
  font-size: 0.875rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.btn-back-to-threshold-small {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.2px;
}

.btn-back-to-threshold-small:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.working-quadrants {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  min-height: 0;
}

.working-quadrants.summary-expanded {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.quadrant-summary.expanded {
  grid-column: 1;
  grid-row: 1 / -1;
}

.working-quadrants.summary-expanded .quadrant-sources {
  display: none;
}

.working-quadrants.summary-expanded .quadrant-notes {
  grid-column: 2;
  grid-row: 1;
}

.working-quadrants.summary-expanded .quadrant-answer {
  grid-column: 2;
  grid-row: 2;
}

.quadrant {
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.quadrant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.3);
}

.quadrant-header h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dig-deeper-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.3);
  flex-shrink: 0;
}

.dig-deeper-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.dig-deeper-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}

.dig-deeper-input::placeholder {
  color: #808080;
}

.dig-deeper-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-send {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 60px;
}

.btn-send:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-send:active {
  background: rgba(255, 255, 255, 0.2);
}

.btn-send svg {
  width: 16px;
  height: 16px;
}

.quadrant-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 0;
  /* Scrollbars use global dark theme styling */
}

.quadrant-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  padding: 1rem;
  resize: none;
  outline: none;
  overflow-y: auto;
  min-height: 0;
  /* Scrollbars use global dark theme styling */
}

.quadrant-textarea::placeholder {
  color: #808080;
}

.quadrant-summary .quadrant-content {
  color: #e0e0e0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.llm-summary {
  color: #e0e0e0;
}

.llm-summary p {
  margin: 0 0 0.75rem 0;
}

.llm-summary.deeper-analysis {
  color: #e0e0e0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.llm-summary.deeper-analysis p {
  margin: 0 0 1rem 0;
}

.llm-summary a.citation-link {
  color: #60a5fa;
  text-decoration: underline;
  cursor: pointer;
}

.llm-summary a.citation-link:hover {
  color: #93c5fd;
}

.quadrant-sources .source-name-item {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: #e8e8e8;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.quadrant-sources .source-name-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.quadrant-sources .source-answer-item {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quadrant-sources .source-answer-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.quadrant-sources .source-answer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.quadrant-sources .source-number {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-weight: 500;
}

.quadrant-sources .source-title {
  color: #ffffff;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quadrant-sources .source-lines {
  color: #808080;
  font-size: 0.6875rem;
}

.quadrant-sources .source-answer-text {
  color: #b0b0b0;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quadrant-sources .btn-view-source {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.quadrant-sources .btn-view-source:hover {
  background: rgba(255, 255, 255, 0.1);
}

.quadrant-notes .notes-input {
  color: #e0e0e0;
}

.notes-editor {
  padding: 1rem;
  line-height: 1.6;
  outline: none;
  min-height: 100px;
}

.notes-editor ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: none;
}

.notes-editor ul ul {
  padding-left: 1.5rem;
}

.notes-editor li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.25rem;
  min-height: 1.2em;
}

.notes-editor li:before {
  content: '•';
  position: absolute;
  left: -1rem;
  color: rgba(255, 255, 255, 0.6);
}

.notes-editor li.notes-placeholder {
  color: #808080;
}

.notes-editor li.notes-placeholder:before {
  color: rgba(255, 255, 255, 0.3);
}

.notes-editor li:focus {
  outline: none;
}

.notes-editor li[style*="list-style"]:before {
  display: none;
}

.quadrant-answer .answer-input {
  color: #e0e0e0;
}

.answer-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.answer-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.autosave-indicator {
  font-size: 0.6875rem;
  color: #808080;
  transition: color 0.3s ease;
}

.source-count {
  font-size: 0.6875rem;
  color: #808080;
}

.working-answer-section {
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.working-sources-section {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.3px;
}

.source-count {
  color: #808080;
  font-size: 0.875rem;
  font-weight: 400;
}

.working-answer-input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
  padding: 1.5rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  resize: vertical;
  min-height: 200px;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease;
}

.working-answer-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.working-answer-input::placeholder {
  color: #606060;
}

.answer-actions {
  display: flex;
  gap: 1rem;
}

.source-answers-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.source-answer-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.source-answer-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.source-answer-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.source-number {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #808080;
  font-size: 0.875rem;
  font-weight: 400;
  flex-shrink: 0;
}

.source-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
}

.source-answer-text {
  color: #c0c0c0;
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.btn-view-source {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-view-source:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .knowledge-layout,
  .diligence-layout {
    grid-template-columns: 1fr;
  }
  
  .working-area-container {
    padding: 1.5rem;
  }
  
  .working-question-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .section {
    padding: 4rem 2rem;
  }
  
  .top-nav {
    padding: 0.75rem 1.5rem;
    height: 45px;
  }

  .app-container {
    padding: 3rem 0 2rem 0;
    height: calc(100vh - 45px);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-secondary {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  }

/* Threshold Report Styles */
.threshold-report-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.report-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: #ffffff;
}

.report-date {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.threshold-report-content {
  padding: 1rem 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Answer text styling in report */
.report-answer-text {
  color: #ffffff !important;
  line-height: 1.7 !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
  display: block !important;
}

/* Report uses same question-node styles as list view - keep dark theme */
.threshold-report-content .question-node {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.threshold-report-content .question-node.answered {
  opacity: 0.6;
}

.threshold-report-content .question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.threshold-report-content .question-text {
  color: #ffffff;
  font-size: 0.9375rem;
  flex: 1;
}

/* Answer sections in report */
.report-answer-section {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #f0f0f0);
}

.report-answer-section:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.report-answer-label {
  font-weight: 600;
  color: var(--text-secondary, #666);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-answer-content {
  color: var(--text-color, #333);
  line-height: 1.6;
  padding: 0.75rem;
  background: var(--bg-secondary, #f9f9f9);
  border-radius: 4px;
  white-space: pre-wrap;
}

.report-answer-content.empty {
  color: var(--text-secondary, #999);
  font-style: italic;
  background: transparent;
  padding: 0.5rem 0.75rem;
}

/* Sub-questions in report */
.threshold-report-content .sub-questions {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

/* Responsive adjustments for report */
@media (max-width: 768px) {
  .threshold-report-container {
    padding: 1rem;
  }
  
  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .threshold-report-content .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .threshold-report-content .question-status-badge {
    margin-left: 0;
  }
}
  