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

/* Skeleton loading animation for perceived performance */
.skeleton-loader {
  padding: 1rem 1.5rem;
}

.skeleton-item {
  height: 3rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Progress spinner for action buttons */
.progress-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #4a9eff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .progress-spinner {
  margin-right: 0.5rem;
}

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

.doc-viewer-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-back-to-ti {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-back-to-ti:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
  color: #60a5fa;
}

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

/* Source filtering controls */
.source-controls {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-source-control {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 3px;
}

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

.btn-refresh-sources {
  margin-left: auto;
  border-color: rgba(100, 181, 246, 0.3);
  color: rgba(100, 181, 246, 0.9);
}

.btn-refresh-sources:hover {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.5);
  color: #64b5f6;
}

/* Source list with checkboxes */
.source-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.source-name-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: default;
}

.source-name-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.source-name-item.selected {
  background: rgba(100, 181, 246, 0.08);
}

/* Custom checkbox styling */
.source-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.source-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.source-checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  background: transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.source-checkbox:checked + .source-checkbox-custom {
  background: rgba(100, 181, 246, 0.3);
  border-color: rgba(100, 181, 246, 0.6);
}

.source-checkbox:checked + .source-checkbox-custom::after {
  content: '✓';
  color: #64b5f6;
  font-size: 0.75rem;
  font-weight: bold;
}

.source-checkbox-label:hover .source-checkbox-custom {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Source title (clickable to navigate to KB) */
.source-title {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.source-title:hover {
  color: #64b5f6;
  text-decoration: underline;
}

/* Relevance badge for semantically matched sources */
.relevance-badge {
  color: rgba(100, 181, 246, 0.8);
  font-size: 0.625rem;
  flex-shrink: 0;
  margin-left: 0.25rem;
  opacity: 0.8;
}

/* 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.5rem 0.625rem;
  font-size: 1.125rem;
  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: 18px;
  height: 18px;
}

.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.5rem 0.875rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
  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);
}

.btn-upload-ti {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

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

.btn-upload-ti svg {
  width: 18px;
  height: 18px;
}

.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;
  touch-action: none;
}

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

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

.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: 6px;
  padding: 0.5rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Open questions - warm orange tint */
.question-node.visual-node.open {
  border-color: rgba(255, 152, 0, 0.4);
  background: rgba(255, 152, 0, 0.08);
}

/* Answered/Closed questions - cool green tint */
.question-node.visual-node.answered {
  border-color: rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.08);
  opacity: 0.85;
}

/* Status indicator dot */
.question-node.visual-node .status-indicator {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 5;
}

.question-node.visual-node.open .status-indicator {
  background: #ff9800;
  box-shadow: 0 0 6px rgba(255, 152, 0, 0.6);
}

.question-node.visual-node.answered .status-indicator {
  background: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

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

.question-node.visual-node.root-node.open {
  border-color: rgba(255, 152, 0, 0.5);
  background: rgba(255, 152, 0, 0.1);
}

.question-node.visual-node.root-node.answered {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.1);
}

.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;
  gap: 0.5rem;
}

/* Hide drag handle in map view */
.question-node.visual-node .drag-handle {
  display: none;
}

.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: text;
  flex: 1;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.question-text:hover {
  background: rgba(255, 255, 255, 0.05);
}

.question-text:focus {
  outline: none;
}

/* Inline edit input */
.inline-edit-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(100, 181, 246, 0.5);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.9375rem;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
  font-family: inherit;
  outline: none;
}

.inline-edit-input:focus {
  border-color: rgba(100, 181, 246, 0.8);
  box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
}

.question-node.visual-node .question-text {
  font-size: 0.75rem;
  line-height: 1.3;
  display: block;
  margin-bottom: 0.25rem;
  padding-left: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Compact visual node styles for map view */
.question-node.visual-node.visual-node-compact {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  overflow: hidden;
}

.question-node.visual-node.visual-node-compact:hover {
  transform: scale(1.02);
  z-index: 10;
}

.question-node.visual-node.visual-node-compact .question-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 1rem;
  overflow: hidden;
}

.question-node.visual-node.visual-node-compact .question-text-compact {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Investment root node - special styling */
.question-node.visual-node.investment-root {
  border: 2px solid rgba(100, 181, 246, 0.6);
  background: rgba(100, 181, 246, 0.15);
  font-weight: 600;
}

.question-node.visual-node.investment-root:hover {
  border-color: rgba(100, 181, 246, 0.8);
  background: rgba(100, 181, 246, 0.2);
}

.question-node.visual-node.investment-root .question-text-compact {
  font-size: 0.85rem;
}

/* Diff badges for version history changes */
.diff-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  z-index: 10;
  letter-spacing: 0.5px;
}

.diff-badge-new {
  background: rgba(76, 175, 80, 1);
  color: white;
}

.diff-badge-closed {
  background: rgba(33, 150, 243, 1);
  color: white;
}

.diff-badge-reopened {
  background: rgba(255, 152, 0, 1);
  color: white;
}

/* Diff node styles */
.question-node.visual-node.diff-new {
  border-color: rgba(76, 175, 80, 0.6);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.question-node.visual-node.diff-closed {
  border-color: rgba(33, 150, 243, 0.6);
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

.question-node.visual-node.diff-reopened {
  border-color: rgba(255, 152, 0, 0.6);
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
}

.question-node.visual-node .inline-edit-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.5rem 0;
}

.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.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.125rem;
  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);
}

/* Open working area button */
.btn-open-working {
  background: transparent;
  border: 1px solid rgba(100, 181, 246, 0.3);
  color: rgba(100, 181, 246, 0.8);
  width: 2.125rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.btn-open-working:hover {
  color: #ffffff;
  background: rgba(100, 181, 246, 0.2);
  border-color: rgba(100, 181, 246, 0.5);
  transform: translateX(2px);
}

/* Open button in map/visual view */
.question-node.visual-node .btn-open-working {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  margin: 0;
  width: 1.875rem;
  height: 1.875rem;
  font-size: 1.125rem;
  opacity: 0.7;
  z-index: 10;
}

.question-node.visual-node .btn-open-working:hover {
  opacity: 1;
}

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

/* Drag and Drop Styles for List View */
.drag-handle {
  cursor: grab;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  padding: 0.4rem 0.5rem;
  margin-right: 0.5rem;
  user-select: none;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  letter-spacing: -3px;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drag-handle:hover {
  color: rgba(100, 181, 246, 0.9);
  background: rgba(100, 181, 246, 0.15);
  transform: scale(1.1);
}

.drag-handle:active {
  cursor: grabbing;
  color: rgba(100, 181, 246, 1);
  background: rgba(100, 181, 246, 0.25);
  transform: scale(0.95);
}

/* Question node in list view */
.questions-tree:not(.whiteboard) .question-node {
  position: relative;
}

.question-node.dragging {
  opacity: 0.3;
  background: rgba(100, 181, 246, 0.1) !important;
  border-left-color: rgba(100, 181, 246, 0.5) !important;
}

/* Threshold issue styling in list view */
.questions-tree:not(.whiteboard) .question-node.threshold-issue {
  border-left: 3px solid rgba(100, 181, 246, 0.5);
  background: rgba(100, 181, 246, 0.03);
  margin-bottom: 1rem;
}

.questions-tree:not(.whiteboard) .question-node.threshold-issue > .question-header .question-text {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

/* Collapse button for threshold issues in list view */
.btn-collapse {
  background: transparent;
  border: none;
  color: rgba(100, 181, 246, 0.7);
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  border-radius: 3px;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.btn-collapse:hover {
  color: rgba(100, 181, 246, 1);
  background: rgba(100, 181, 246, 0.15);
}

/* Collapsed state indicator for threshold issues */
.questions-tree:not(.whiteboard) .question-node.collapsed {
  border-left-color: rgba(100, 181, 246, 0.3);
}

/* Collapsed sub-question count badge */
.collapsed-count {
  color: rgba(100, 181, 246, 0.7);
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Hide collapse button in map/whiteboard view */
.whiteboard .btn-collapse {
  display: none;
}

/* Drop zone indicators */
.questions-tree.drag-active .question-node {
  position: relative;
}

.question-node.drag-over-before::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(100, 181, 246, 1), rgba(100, 181, 246, 0.4));
  border-radius: 2px;
  z-index: 10;
  box-shadow: 0 0 8px rgba(100, 181, 246, 0.5);
}

.question-node.drag-over-after::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(100, 181, 246, 1), rgba(100, 181, 246, 0.4));
  border-radius: 2px;
  z-index: 10;
  box-shadow: 0 0 8px rgba(100, 181, 246, 0.5);
}

.question-node.drag-over-child {
  background: rgba(100, 181, 246, 0.15) !important;
  border-left-color: rgba(100, 181, 246, 0.8) !important;
  box-shadow: inset 0 0 0 1px rgba(100, 181, 246, 0.4);
}

.question-node.drag-over-child > .question-header {
  position: relative;
}

.question-node.drag-over-child > .question-header::after {
  content: '→ Nest as child';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: rgba(100, 181, 246, 0.9);
  background: rgba(10, 10, 10, 0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  pointer-events: none;
}

/* Prevent text selection during drag */
.questions-tree.drag-active {
  user-select: none;
}

.questions-tree.drag-active .question-text {
  pointer-events: none;
}

/* Visual feedback for valid drop targets */
.questions-tree.drag-active .question-node:not(.dragging) {
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* Subtle highlight for all potential drop targets during drag */
.questions-tree.drag-active .question-node:not(.dragging):hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.source-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: rgba(59, 130, 246, 0.8);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

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

/* Hide drag handle in report view */
.threshold-report-content .drag-handle {
  display: none;
}

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

/* Yellow text for new questions in report comparison */
.threshold-report-content .question-node.report-new-question .question-text {
  color: #fbbf24 !important;
}

/* 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;
  }
}

/* Deal Team Avatars */
.deal-team-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.deal-team-avatars {
  display: flex;
  align-items: center;
}

.deal-team-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  border: 2px solid #0a0a0a;
  margin-left: -8px;
  cursor: pointer;
  transition: transform 0.2s ease, z-index 0.2s ease;
  position: relative;
}

.deal-team-avatar:first-child {
  margin-left: 0;
}

.deal-team-avatar:hover {
  transform: scale(1.1);
  z-index: 10;
}

.deal-team-avatar.overflow {
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.6875rem;
}

.deal-team-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.25rem;
}

.deal-team-add:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Document Viewer Line Numbers */
.doc-lines-container {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.doc-line {
  display: flex;
  align-items: flex-start;
  min-height: 1.6em;
}

.line-number {
  flex-shrink: 0;
  width: 3rem;
  padding-right: 1rem;
  text-align: right;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 1rem;
}

.line-content {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Citation Highlighting */
.doc-line.highlighted-line {
  background: rgba(59, 130, 246, 0.15);
  border-left: 3px solid #3b82f6;
  margin-left: -3px;
}

.doc-line.highlighted-line .line-number {
  color: #3b82f6;
}

.doc-line.highlighted-line .line-content {
  color: #ffffff;
}

/* Pulse animation for highlighted lines */
.doc-line.highlight-pulse {
  animation: citationPulse 0.8s ease-in-out 3;
}

@keyframes citationPulse {
  0%, 100% {
    background: rgba(59, 130, 246, 0.15);
  }
  50% {
    background: rgba(59, 130, 246, 0.35);
  }
}

/* Faded highlight state */
.doc-line.highlighted-line-fade {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid rgba(59, 130, 246, 0.3);
  margin-left: -3px;
  transition: all 2s ease;
}

.doc-line.highlighted-line-fade .line-number {
  color: rgba(59, 130, 246, 0.5);
  transition: color 2s ease;
}

/* Source Number Badge */
.source-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 3px;
  color: #3b82f6;
  font-size: 0.6875rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Source number in Knowledge Base list */
.source-number.kb-source-number {
  margin-right: 0.5rem;
}

/* Numbered Citation Links in LLM Summary */
.citation-link.citation-numbered {
  display: inline;
  background: rgba(59, 130, 246, 0.15);
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875em;
  transition: all 0.2s ease;
}

.citation-link.citation-numbered:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* New/Changed Content Highlighting in Report */
/* App display: Yellow for visibility on dark background */
.new-content {
  color: #fbbf24;
  font-weight: 500;
}

/* PDF export will use blue - handled in JavaScript */

/* ========================================== */
/* Agenda Mode Styles                         */
/* ========================================== */

.btn-agenda-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

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

.btn-agenda-toggle.active {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.4);
  color: #64b5f6;
}

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

/* Version History Button */
.btn-version-history {
  display: inline-flex;
  align-items: center;
}

/* Baseline Comparison Selector */
.baseline-select {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  background: #000000;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  min-width: 140px;
}

.baseline-select option {
  background: #000000;
  color: #ffffff;
}

.baseline-select:hover {
  border-color: var(--accent-color);
}

.baseline-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(71, 108, 230, 0.2);
}

/* Yellow highlighting for new/changed content in report comparison (app view) */
.report-new-content {
  color: #fbbf24 !important; /* Yellow for new content */
}

.report-new-question .question-text {
  color: #fbbf24 !important;
}

.report-new-answer {
  color: #fbbf24 !important;
}

.report-changed-answer {
  color: #fbbf24 !important;
}

/* Version History Panel */
.version-history-panel {
  position: fixed;
  top: 50px;
  right: -400px;
  width: 380px;
  height: calc(100vh - 50px);
  background: #0a0a0a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 900;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.version-history-panel.open {
  right: 0;
}

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

.version-history-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
}

.btn-close-version-history {
  background: transparent;
  border: none;
  color: #808080;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-close-version-history:hover {
  color: #ffffff;
}

.version-history-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.version-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.version-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.version-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.version-item.selected {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.4);
}

.version-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.version-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: #808080;
}

.version-stats span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.version-user {
  font-size: 0.75rem;
  color: #606060;
  margin-top: 0.25rem;
}

/* Compare Section */
.version-compare {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-header {
  margin-bottom: 1rem;
}

.compare-header h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #a0a0a0;
}

.compare-select {
  width: 100%;
  padding: 0.5rem;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  cursor: pointer;
}

.compare-select option {
  background: #000000;
  color: #ffffff;
}

.version-diff {
  max-height: 400px;
  overflow-y: auto;
}

.diff-item {
  padding: 0.625rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.diff-item.added {
  background: rgba(76, 175, 80, 0.15);
  border-left: 3px solid #4caf50;
  color: #a5d6a7;
}

.diff-item.removed {
  background: rgba(244, 67, 54, 0.15);
  border-left: 3px solid #f44336;
  color: #ef9a9a;
}

.diff-item.changed {
  background: rgba(255, 193, 7, 0.15);
  border-left: 3px solid #ffc107;
  color: #fff59d;
}

.diff-item.status-change {
  background: rgba(33, 150, 243, 0.15);
  border-left: 3px solid #2196f3;
  color: #90caf9;
}

.diff-item-header {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.diff-item-detail {
  font-size: 0.75rem;
  opacity: 0.8;
}

.diff-old-value {
  text-decoration: line-through;
  opacity: 0.6;
}

.diff-new-value {
  font-weight: 500;
}

.diff-arrow {
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* Agenda Toolbar */
.agenda-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 0;
  margin: 0 0 0.5rem 0;
}

.agenda-toolbar-info {
  color: #64b5f6;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.agenda-toolbar-actions button {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  background: transparent;
  border: 1px solid rgba(100, 181, 246, 0.3);
  color: #64b5f6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agenda-toolbar-actions button:hover {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.5);
}

.btn-agenda-export {
  background: rgba(100, 181, 246, 0.2) !important;
  border-color: rgba(100, 181, 246, 0.5) !important;
  font-weight: 500 !important;
}

.btn-agenda-cancel {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #a0a0a0 !important;
}

.btn-agenda-cancel:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

/* Agenda Checkbox in Question Nodes */
.agenda-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.agenda-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #64b5f6;
}

.agenda-checkbox:checked {
  background-color: #64b5f6;
}

/* Highlight selected items in agenda mode */
.question-node.agenda-selected {
  background: rgba(100, 181, 246, 0.08);
  border-color: rgba(100, 181, 246, 0.3);
}

/* ========================================== */
/* Project Settings Modal Styles              */
/* ========================================== */

.btn-project-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

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

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

.settings-modal.active {
  display: flex;
}

.settings-modal-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-modal-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);
}

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

.settings-section {
  margin-bottom: 2rem;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 1rem;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.settings-field label {
  font-size: 0.875rem;
  color: #a0a0a0;
}

.settings-field input[type="text"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
}

.settings-field input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Logo Upload Area */
.logo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 120px;
  text-align: center;
}

.logo-upload-area:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
}

.logo-upload-area.has-logo {
  border-style: solid;
  border-color: rgba(100, 181, 246, 0.3);
}

.logo-preview {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.logo-upload-text {
  color: #808080;
  font-size: 0.875rem;
}

.logo-upload-hint {
  color: #606060;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.logo-remove-btn {
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logo-remove-btn:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.5);
}

/* Addon Deal Toggle */
.addon-toggle-row {
  grid-template-columns: 1fr;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}

.addon-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: #d0d0d0;
  font-size: 0.9375rem;
}

.addon-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #64b5f6;
  cursor: pointer;
}

.platform-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================== */
/* Email Submissions Tab & Modal Styles       */
/* ========================================== */

/* Submissions Tab Badge */
.submissions-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  background: rgba(255, 193, 7, 0.2);
  border-radius: 10px;
  color: #ffc107;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.submissions-badge:empty {
  display: none;
}

/* Submissions Plane Layout */
.submissions-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  padding: 1.5rem;
}

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

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

.btn-show-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid rgba(100, 181, 246, 0.3);
  color: #64b5f6;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-show-email:hover {
  background: rgba(100, 181, 246, 0.2);
  border-color: rgba(100, 181, 246, 0.5);
}

/* Submissions List */
.submissions-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.submission-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.submission-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 4px;
  color: #ffc107;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.submission-card.type-source .submission-icon {
  background: rgba(100, 181, 246, 0.1);
  border-color: rgba(100, 181, 246, 0.2);
  color: #64b5f6;
}

.submission-card.type-question .submission-icon {
  background: rgba(129, 199, 132, 0.1);
  border-color: rgba(129, 199, 132, 0.2);
  color: #81c784;
}

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

.submission-subject {
  color: #ffffff;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submission-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #808080;
}

.submission-sender {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-date {
  flex-shrink: 0;
}

.submission-status {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.status-badge-submission {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
}

.status-badge-submission.pending {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

.status-badge-submission.accepted {
  background: rgba(129, 199, 132, 0.1);
  border: 1px solid rgba(129, 199, 132, 0.3);
  color: #81c784;
}

.status-badge-submission.rejected {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

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

.email-alias-modal.active {
  display: flex;
}

.email-alias-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
}

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

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

.email-address-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid rgba(100, 181, 246, 0.2);
  margin-bottom: 1.5rem;
}

.email-address-text {
  flex: 1;
  color: #64b5f6;
  font-size: 1rem;
  font-family: monospace;
  word-break: break-all;
}

.btn-copy-email {
  padding: 0.5rem 1rem;
  background: rgba(100, 181, 246, 0.2);
  border: 1px solid rgba(100, 181, 246, 0.4);
  color: #64b5f6;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-email:hover {
  background: rgba(100, 181, 246, 0.3);
}

.email-instructions {
  color: #a0a0a0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.email-instructions h4 {
  color: #ffffff;
  font-size: 0.9375rem;
  margin: 0 0 0.75rem 0;
}

.email-instructions ul {
  margin: 0;
  padding-left: 1.25rem;
}

.email-instructions li {
  margin-bottom: 0.5rem;
}

.email-instructions code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  color: #64b5f6;
  font-size: 0.8125rem;
}

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

.submission-review-modal.active {
  display: flex;
}

.submission-review-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

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

.submission-review-title {
  flex: 1;
}

.submission-review-title h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
}

.submission-review-meta {
  font-size: 0.875rem;
  color: #808080;
}

.submission-review-body {
  margin-bottom: 1.5rem;
}

.submission-body-label {
  font-size: 0.875rem;
  color: #a0a0a0;
  margin-bottom: 0.5rem;
}

.submission-body-text {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  color: #ffffff;
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.submission-attachments {
  margin-bottom: 1.5rem;
}

.submission-attachments-label {
  font-size: 0.875rem;
  color: #a0a0a0;
  margin-bottom: 0.5rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.25rem;
}

.attachment-icon {
  color: #64b5f6;
}

.attachment-name {
  flex: 1;
  color: #ffffff;
  font-size: 0.875rem;
}

.attachment-size {
  color: #808080;
  font-size: 0.75rem;
}

.submission-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-accept-source {
  padding: 0.75rem 1.5rem;
  background: rgba(100, 181, 246, 0.15);
  border: 1px solid rgba(100, 181, 246, 0.4);
  color: #64b5f6;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept-source:hover {
  background: rgba(100, 181, 246, 0.25);
}

.btn-accept-question {
  padding: 0.75rem 1.5rem;
  background: rgba(129, 199, 132, 0.15);
  border: 1px solid rgba(129, 199, 132, 0.4);
  color: #81c784;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept-question:hover {
  background: rgba(129, 199, 132, 0.25);
}

.btn-reject-submission {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reject-submission:hover {
  background: rgba(255, 107, 107, 0.1);
}

.btn-close-review {
  margin-left: auto;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #a0a0a0;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* ==================== INACTIVITY WARNING TOAST ==================== */

.inactivity-warning-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.inactivity-warning-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.inactivity-warning-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.4);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.inactivity-warning-icon {
  font-size: 1.25rem;
}

.inactivity-warning-text {
  color: #ffc107;
  font-size: 0.9375rem;
  font-weight: 500;
}

.inactivity-warning-dismiss {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.4);
  color: #ffc107;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.inactivity-warning-dismiss:hover {
  background: rgba(255, 193, 7, 0.3);
  border-color: rgba(255, 193, 7, 0.6);
}
  