.workspace {
  display: flex;
  align-items: flex-start;
  overflow: visible;
  overflow-anchor: none;
  font-family: var(--font-mono); 
}

body:not(.app-active) #app-container {
  display: none !important;
}


body.app-active #app-container {
  display: flex !important; 
}

.pane-left {
  width: 380px;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  border-right: 2px solid #111;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  overflow-y: scroll; 
  flex-shrink: 0;
  padding-bottom: 2rem;
}


.pane-left::-webkit-scrollbar {
  width: 10px;
}
.pane-left::-webkit-scrollbar-track {
  background: var(--bg-main);
  border-left: 2px solid var(--border-color);
}
.pane-left::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 2px solid var(--bg-main);
}
.pane-left::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.pane-left {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-main);
}

.pane-scroll-indicator {
  position: sticky;
  bottom: 1.5rem;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-main);
  border: 2px solid var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 10;
  box-shadow: 4px 4px 0px var(--text-primary);
  margin-top: 2rem; 
  transition: opacity 0.5s ease-out, visibility 0.5s;
}

.pane-scroll-indicator.hidden {
  opacity: 0;
  visibility: hidden;
}

.pane-scroll-indicator .arrow {
  font-size: 1rem;
  line-height: 1;
  animation: brutal-bounce 1s infinite alternate ease-in-out;
}

@keyframes brutal-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(4px); }
}

@media (max-width: 1024px) {
  .pane-scroll-indicator {
    display: none;
  }
}

.summary-header {
  padding: 2rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}
.verdict {
  font-size: 1.2rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  padding: 1.25rem 1rem;
  border: 2px solid currentColor;
  display: block; /* Full width */
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.5rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
  position: relative;
  background: transparent;
  text-align: center;
}
.verdict::before {
  content: 'RESULT';
  position: absolute;
  top: -10px;
  left: 10px;
  background: var(--bg-main);
  padding: 0 5px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.verdict.block {
  background: var(--fail-text);
  color: #000;
}
.verdict.allow {
  background: var(--pass-text);
  color: #000;
}

.pane-right {
  flex: 1;
  height: auto;
  overflow-y: hidden;
  padding: 3rem;
  background-color: var(--bg-main);
}

.pane-right.scroll-ready {
  overflow-y: auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}
.bento-card {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-color);
  border-radius: 0;
  padding: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}
.bento-card:hover {
  border-color: var(--text-primary);
}
.bento-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  width: 100%;
}

.hw-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.hw-item:hover {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}


@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 3rem;
  }


  .bento-w-2 { grid-column: span 2; }
  .bento-h-2 { grid-row: span 2; }

  @media (max-width: 720px) {
    .bento-grid {
      grid-template-columns: 1fr;
      gap: 3rem;
    }
    .bento-w-2 { grid-column: span 1; }
  }
  .workspace {
    flex-direction: column;
    overflow-y: auto;
  }
  .pane-left {
    width: 100%;
    height: auto;
    min-height: 64px;
    max-height: none;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 2px solid var(--text-primary);
    flex-shrink: 0;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
  }
  .pane-right {
    width: 100%;
    padding: 2rem 1rem;
    overflow: visible;
  }

  .summary-header {
    border-bottom: 2px solid var(--border-color);
    padding: 2rem 1rem;
    text-align: left;
  }
  .verdict {
    font-size: 1.4rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .tablet-split-wrapper {
    display: flex;
    flex-direction: column;
  }


  /* Tablet: 721px - 1024px */
  @media (min-width: 721px) {
    .pane-left {
      padding: 0 0;
    }
    .summary-header {
      padding: 2rem 3rem;
    }
    .tablet-split-wrapper {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      justify-content: flex-start;
    }
    #risk-score-container {
      flex: 1;
      display: flex !important;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-right: 2px solid var(--border-color);
      border-bottom: none !important;
      text-align: center;
      padding: 0 !important;
    }
    #risk-gauge svg {
      width: 100% !important;
      max-width: 420px !important;
      height: auto !important;
    }
    .flags-container {
      flex: 1;
      display: block !important;
      padding: 2rem 3rem;
    }
  }


  /* Mobile: <= 720px */
  @media (max-width: 720px) {
    #risk-score-container {
      width: 100% !important;
      padding: 2rem 1rem !important;
      border-bottom: 2px solid var(--border-color) !important;
    }

    #risk-gauge svg {
      width: 100% !important;
      max-width: 480px;
      height: auto !important;
    }

    #risk-label {
      font-size: 1.4rem !important;
      margin-top: 1rem;
    }


    .flags-container {
      display: block !important; 
      padding: 2rem 1rem;
    }
  }
}
