:root {
  --yellow: #ffd94a;
  --yellow-deep: #f4c21f;
  --black: #111111;
  --off-black: #1d1d1d;
  --background: #f6f1e5;
  --red: #ff4b4b;
  --border-subtle: #ded2b8;
  --text-main: #16120c;
  --text-muted: #6e6252;
  --card-bg: #fffaf0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Apply Arrow cursor globally to everything - always visible from page load */
html {
  cursor: url('assets/Arrow.svg'), auto !important;
}

html, body, *, *::before, *::after {
  cursor: url('assets/Arrow.svg'), auto !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Inter', sans-serif;
  background: radial-gradient(circle at top left, #fff7cb 0, #f6f1e5 45%, #f6f1e5 100%);
  color: var(--text-main);
  cursor: url('assets/Arrow.svg'), auto !important;
}

/* Text inputs use Arrow cursor (not select red) */
input[type="text"], input[type="textarea"], textarea {
  cursor: url('assets/Arrow.svg'), text !important;
}

/* Only the highlighted-text div uses select red cursor */
#highlighted-text, #highlighted-text *, #highlighted-text *::before, #highlighted-text *::after {
  cursor: url('assets/select red.svg'), text !important;
}

/* Clickable elements use forlinks cursor - applies from page load */
button, a, input[type="button"], input[type="submit"], select, [role="button"], [onclick], .cluster-card, .btn-view-all, .cluster-evidence-toggle, .onboarding-option, .feedback-btn, .btn-primary, .btn-export, .btn-validate, .btn-copy-questions, .problem-map-item, .saved-list-item, .btn-link-statement, .btn-view-statements, .save-icon, .tab-btn, .saved-item-btn, .validation-close, #analyze-btn, .analyze-btn {
  cursor: url('assets/forlinks.svg'), pointer !important;
}

.page {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--black);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  border-radius: 999px;
  font-size: 11px;
  padding: 6px 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.badge-neutral {
  background: var(--black);
  color: var(--yellow);
}

.badge-subtle {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 0;
}

.panel {
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.panel-input {
  background: #fffef7;
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.panel-output {
  background: #17130f;
  color: #fef7dd;
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header-output {
  color: #fdf4d0;
}

.panel-title {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
}

.panel-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.panel-output .panel-subtitle {
  color: #d5c7aa;
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.input-shell {
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: #fffcf2;
  overflow: hidden;
  position: relative;
  min-height: 210px;
}

.input-textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  background: transparent;
  color: var(--text-main);
}

.input-textarea:focus {
  outline: none;
}

/* Task 1: Highlighted text view - Paper-like styling */
.highlighted-text {
  width: 100%;
  min-height: 210px;
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
  background: #faf8f3;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  color: #2c2c2c;
  font-family: 'Georgia', 'Times New Roman', 'Times', serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  max-height: 500px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: text;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.pain-highlight {
  background: #ffd94a;
  color: #2c2c2c;
  padding: 0;
  border-radius: 0;
  font-weight: normal;
  transition: all 0.2s ease;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.pain-highlight-active {
  background: #ffd94a;
  color: #2c2c2c;
  padding: 0;
  border-radius: 0;
  font-weight: normal;
  box-shadow: none;
  z-index: 1;
  position: relative;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}


.input-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.input-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-yellow {
  background: var(--yellow);
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--yellow-deep);
  color: var(--black);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background-color 0.08s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--yellow);
  box-shadow: 0 3px 0 0 rgba(0, 0, 0, 0.7);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
}

.btn-primary[disabled] {
  cursor: url('assets/Arrow.svg'), not-allowed !important;
  opacity: 0.7;
  transform: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.helper-strip {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #17130f;
  color: #fef5d5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.helper-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.helper-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 249, 214, 0.4);
  padding: 5px 9px;
  font-size: 11px;
}

.summary-row {
  margin-bottom: 10px;
  border-radius: 16px;
  padding: 10px 11px 9px;
  background: #211b15;
  border: 1px solid #3c3328;
  min-height: 52px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.summary-row-empty {
  align-items: stretch;
}

.summary-placeholder {
  font-size: 12px;
  color: #b6a78b;
}

.summary-highlight {
  background: var(--yellow);
  color: var(--black);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
}

.summary-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.summary-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #b6a78b;
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
}

.summary-value-accent {
  background: var(--yellow);
  color: #111;
  border-radius: 9px;
  padding: 2px 8px 3px;
}

.summary-note {
  font-size: 11px;
  color: #c7b89b;
}

.clusters-list {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Insights section */
.insights-section {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.insights-title {
  font-size: 14px;
  font-weight: 700;
  color: #fdf4d0;
  margin: 0 0 12px 0;
}

.insights-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-text {
  font-size: 13px;
  color: #b6a78b;
  line-height: 1.5;
  margin: 0;
}

.insight-highlight {
  color: var(--yellow);
  font-weight: 600;
}

/* Clusters container */
.clusters-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* View all button */
.btn-view-all {
  margin-top: 12px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #b6a78b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: flex-start;
}

.btn-view-all:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fdf4d0;
}

/* Accordion evidence section */
.cluster-evidence-section {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.cluster-evidence-section.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.cluster-evidence-section.expanded {
  max-height: 2000px;
  opacity: 1;
  margin-top: 12px;
}

/* Accordion toggle button */
.cluster-evidence-toggle {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #b6a78b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: flex-start;
}

.cluster-evidence-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fdf4d0;
}

.cluster-card {
  border-radius: 16px;
  padding: 10px 12px 9px;
  background: #211b15;
  border: 1px solid #3c3328;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cluster-title {
  font-size: 13px;
  font-weight: 700;
}

.cluster-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 7px;
  border: 1px solid #3c3328;
}

.tag-frequency {
  background: #fef5d5;
  color: #17130f;
  border-color: #fef5d5;
}

.tag-intensity-low {
  color: #c7b89b;
}

.tag-intensity-medium {
  background: #f9e6b3;
  color: #17130f;
}

.tag-intensity-high,
.tag-intensity-very-high {
  background: var(--red);
  color: #fff7f7;
  border-color: var(--red);
}

/* Sticky note tags - need to work on yellow background */
.problem-map-item .tag {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.08);
  color: var(--black);
  font-weight: 600;
}

.problem-map-item .tag-intensity-low {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
}

.problem-map-item .tag-intensity-medium {
  background: rgba(255, 200, 0, 0.3);
  color: var(--black);
}

.problem-map-item .tag-intensity-high,
.problem-map-item .tag-intensity-very-high {
  background: rgba(255, 75, 75, 0.9);
  color: #fff;
  border-color: rgba(255, 75, 75, 1);
}

.problem-map-item .tag-category {
  background: rgba(0, 0, 0, 0.1);
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.2);
}

.pain-word-sticky {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 75, 75, 0.4);
  text-underline-offset: 2px;
}

.cluster-summary {
  font-size: 12px;
  color: #d5c7aa;
}

.cluster-examples-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9f9075;
}

.cluster-examples-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: #fdf4d0;
}

.cluster-examples-list li + li {
  margin-top: 3px;
}

.problem-statement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cluster-examples-list .pain-word {
  color: var(--red);
}

.footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-text strong {
  font-weight: 600;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    min-height: 0;
  }

  .summary-row {
    flex-wrap: wrap;
  }

  .problem-map-section {
    margin-top: 18px;
  }
}

/* Problem Map Styles - Sticky Notes */
.problem-map-section {
  width: 100%;
  margin-top: 24px;
  padding: 20px;
  border-radius: 22px;
  background: #17130f;
  border: 1px solid #3c3328;
  box-sizing: border-box;
}

.problem-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.problem-map-subtitle {
  font-size: 13px;
  color: #d5c7aa;
  margin: 4px 0 0 0;
}

.problem-map-title {
  font-size: 20px;
  font-weight: 700;
  color: #fdf4d0;
  margin: 0;
}

.problem-map-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.problem-map-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #b6a78b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: -1px;
}

.problem-map-tab:hover {
  color: #fdf4d0;
  background: rgba(255, 255, 255, 0.03);
}

.problem-map-tab.active {
  color: #fdf4d0;
  border-bottom-color: var(--yellow);
  font-weight: 600;
}

.tab-folder-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.problem-map-controls {
  display: flex;
  gap: 6px;
}

.btn-map-filter {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #3c3328;
  background: transparent;
  color: #b6a78b;
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-map-filter:hover {
  background: #2a241d;
  border-color: #4a4030;
}

.btn-map-filter.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.problem-map-sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.problem-map-saved-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* macOS-style saved view */
.saved-view {
  margin-top: 16px;
}

.saved-list-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.saved-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.saved-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.saved-list-item:last-child {
  border-bottom: none;
}

.saved-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.saved-list-item:hover .saved-item-icon {
  color: rgba(255, 255, 255, 0.6);
}

.saved-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.saved-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #fdf4d0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.saved-item-frequency {
  font-size: 11px;
  color: #b6a78b;
  font-weight: 500;
}

.saved-item-description {
  font-size: 11px;
  color: #b6a78b;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.saved-list-item:hover .saved-item-actions {
  opacity: 1;
}

.saved-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #b6a78b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.saved-item-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fdf4d0;
}

.saved-remove-btn:hover {
  background: rgba(255, 75, 75, 0.2);
  border-color: rgba(255, 75, 75, 0.4);
  color: #ff8080;
}

.saved-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #b6a78b;
}

.empty-folder-icon {
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 16px;
}

.saved-empty-state p {
  margin: 8px 0;
  font-size: 14px;
}

.empty-hint {
  font-size: 12px;
  color: #8a7d6a;
}

.problem-map-item {
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: rotate(-0.5deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 140px;
  overflow: visible;
}

.save-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  z-index: 10;
  border-radius: 4px;
  opacity: 0.7;
}

.save-icon:hover {
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.05);
  opacity: 1;
}

.save-icon.saved {
  color: rgba(0, 122, 255, 0.9);
  opacity: 1;
}

.save-icon.saved:hover {
  color: rgba(0, 122, 255, 1);
}

.save-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: transparent;
  transition: all 0.2s ease;
}

.save-icon.saved svg {
  fill: currentColor;
}

.problem-map-item:nth-child(even) {
  transform: rotate(0.5deg);
  background: #fff9d4;
}

.problem-map-item:nth-child(3n) {
  transform: rotate(-0.3deg);
  background: #fffce8;
}

.problem-map-item:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.problem-map-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.problem-map-index {
  font-size: 10px;
  font-weight: 700;
  color: var(--black);
  background: rgba(0, 0, 0, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.problem-map-cluster {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  margin-left: auto;
  font-weight: 500;
}

.problem-map-cluster-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin-top: 8px;
  line-height: 1.4;
}

.problem-map-what-this-means {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 600;
  margin-top: 6px;
}

.problem-map-intensity-explanation {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.55);
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.4;
  font-style: normal;
}

.problem-map-frequency {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 4px;
  font-style: italic;
}

.problem-map-quotes-container {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.problem-map-quote {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
  font-style: italic;
  line-height: 1.5;
  padding-left: 8px;
  border-left: 2px solid rgba(0, 0, 0, 0.15);
}

.problem-map-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-view-quotes {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.08);
  color: var(--black);
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
}

.btn-view-quotes:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateX(2px);
}

.btn-link-statement {
  align-self: flex-start;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.08);
  color: var(--black);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-link-statement:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateX(2px);
}

.btn-link-statement:active {
  transform: translateX(0);
  background: rgba(0, 0, 0, 0.12);
}

/* Decorative tape for sticky notes - Torn masking tape style */
.sticky-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 70px;
  height: 22px;
  background: rgba(255, 248, 220, 0.7);
  border-radius: 2px;
  z-index: 3;
  pointer-events: none;

  /* subtle texture */
  background-image: linear-gradient(
    90deg,
    rgba(255, 248, 220, 0.65),
    rgba(255, 245, 200, 0.75),
    rgba(255, 248, 220, 0.65)
  );

  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* Criss-cross torn edges */
.sticky-tape::before,
.sticky-tape::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 6px;
  left: 0;
  background: transparent;
}

.sticky-tape::before {
  top: -4px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 2px,
      transparent 2px,
      transparent 6px
    );
  opacity: 0.2;
}

.sticky-tape::after {
  bottom: -4px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 2px,
      transparent 2px,
      transparent 6px
    );
  opacity: 0.15;
}

/* Natural angle variations */
.sticky-tape.variant-1 {
  transform: translateX(-50%) rotate(-6deg);
}

.sticky-tape.variant-2 {
  transform: translateX(-50%) rotate(3deg);
}

.sticky-tape.variant-3 {
  transform: translateX(-50%) rotate(-1deg);
}

/* Onboarding Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: #faf8f3;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  padding: 40px;
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.onboarding-screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.onboarding-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  line-height: 1.5;
}

.onboarding-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-option {
  padding: 12px 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

.onboarding-option:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateX(2px);
}

.onboarding-option.selected {
  background: var(--yellow);
  border-color: var(--yellow-deep);
  color: var(--black);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.onboarding-continue {
  align-self: center;
  margin-top: 8px;
}

.onboarding-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Feedback UI */
.feedback-container {
  margin-top: 32px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: #faf8f3;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.feedback-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.feedback-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feedback-btn,
.nextstep-btn {
  padding: 10px 20px;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--background);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-btn:hover,
.nextstep-btn:hover {
  border-color: var(--yellow);
  background: rgba(255, 217, 74, 0.1);
}

.feedback-btn.selected,
.nextstep-btn.selected {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}

.feedback-text-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.feedback-textarea {
  padding: 12px;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--background);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

#feedback-submit {
  align-self: flex-start;
}

.feedback-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.feedback-thankyou {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Paper-style feedback questions (matching RAW TEXT input area) */
.feedback-paper-container {
  margin-top: 32px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: #faf8f3;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  padding: 24px 28px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.feedback-highlight {
  background: #ffd94a;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

.feedback-paper-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feedback-paper-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  line-height: 1.5;
}

.feedback-paper-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-paper-btn {
  padding: 12px 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

.feedback-paper-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateX(2px);
}

.feedback-paper-btn.selected {
  background: var(--yellow);
  border-color: var(--yellow-deep);
  color: var(--black);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-reminder {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
}

.feedback-reminder-card {
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: #faf8f3;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  max-width: 260px;
}

.feedback-reminder-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.feedback-reminder-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.feedback-reminder-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feedback-reminder-buttons .feedback-btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* Cluster Card Enhancements */
.cluster-insight {
  font-size: 11px;
  color: #9f9075;
  margin-top: 4px;
  font-style: italic;
}

/* Task 4: "What this means" label */
.cluster-what-this-means {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-top: 4px;
  font-weight: 600;
}

/* Task 1: Cluster card hover effect */
.cluster-card:hover {
  border-color: #4a4030;
  background: #251f18;
}

.tag-strength {
  background: #2a241d;
  color: var(--yellow);
  border-color: #3c3328;
}

.tag-category {
  background: #1a1612;
  color: #c7b89b;
  border-color: #2a241d;
}

.tag-category-direction {
  background: rgba(254, 245, 213, 0.15);
  color: var(--yellow);
  border-color: rgba(254, 245, 213, 0.3);
}

.tag-category-execution {
  background: rgba(255, 128, 128, 0.15);
  color: #ff8080;
  border-color: rgba(255, 128, 128, 0.3);
}

.tag-category-signal {
  background: rgba(128, 200, 255, 0.15);
  color: #80c8ff;
  border-color: rgba(128, 200, 255, 0.3);
}

.tag-category-process {
  background: rgba(200, 128, 255, 0.15);
  color: #c880ff;
  border-color: rgba(200, 128, 255, 0.3);
}

.tag-category-capacity {
  background: rgba(255, 200, 128, 0.15);
  color: #ffc880;
  border-color: rgba(255, 200, 128, 0.3);
}

.cluster-problems-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-top: 8px;
  margin-bottom: 4px;
}

.problem-statement {
  font-weight: 600;
  color: #fdf4d0;
}

.cluster-examples-raw {
  margin-top: 6px;
  opacity: 0.8;
}

.cluster-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #2a241d;
}

.btn-view-statements {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #3c3328;
  background: transparent;
  color: var(--yellow);
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-view-statements:hover {
  background: rgba(254, 245, 213, 0.1);
  border-color: var(--yellow);
}

@media (max-width: 640px) {
  .page {
    padding: 14px 14px 18px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .input-footer {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .problem-map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .problem-map-sticky-grid {
    grid-template-columns: 1fr;
  }
}


