.hidden { display: none !important; }

/* search */
.osint-search-area {
  margin-bottom: var(--space-6);
}

.osint-search-bar {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  overflow: hidden;
}

.osint-search-input {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-family: var(--font-ui);
}
.osint-search-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.osint-search-input:focus {
  box-shadow: none !important;
  outline: none;
}

.osint-search-btn {
  padding: 16px 26px;
  border: 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: linear-gradient(135deg, var(--accent-primary), #e1b45f);
  color: #101317;
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
}
.osint-search-btn:hover {
  filter: brightness(1.08);
}

.osint-hint {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* results */
#osintResults {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* detection */
.osint-detection {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.osint-detection-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.osint-detection-value {
  color: var(--accent-primary);
  font-weight: var(--font-semibold);
}
.osint-detection-candidates {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
}
.osint-change-btn {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-secondary);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  cursor: pointer;
}
.osint-change-btn:hover {
  border-color: var(--accent-secondary);
  background: color-mix(in srgb, var(--accent-secondary) 8%, transparent);
}

/* inline-feedback */
.inline-feedback {
  border: 1px solid color-mix(in srgb, var(--accent-error) 55%, var(--border));
  background: color-mix(in srgb, var(--accent-error) 12%, transparent);
  color: var(--accent-error);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
}

/* type picker */
.osint-type-picker {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.osint-picker-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.osint-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.osint-picker-options button {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  cursor: pointer;
}
.osint-picker-options button:hover,
.osint-picker-options button.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
}

/* section label */
.osint-section-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}



/* fielded context */
.osint-field-form {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.osint-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.osint-field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.osint-field-label {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.osint-field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}
.osint-field-input::placeholder {
  color: var(--text-muted);
}
.osint-field-input:focus {
  border-color: var(--accent-secondary);
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-secondary) 18%, transparent);
}
.unlock-banner {
  padding: var(--space-3) var(--space-4);
  border: 1px solid color-mix(in srgb, var(--accent-warning) 40%, var(--border));
  border-left: 3px solid var(--accent-warning);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-warning) 10%, var(--bg-surface));
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.osint-unlock-banner {
  /* Backward-compatible alias for older static checks; rendered markup uses .unlock-banner. */
}
.stage-result-card.locked {
  border-style: dashed;
  background: color-mix(in srgb, var(--bg-primary) 72%, var(--bg-surface));
  opacity: 0.62;
}
.stage-result-card .result-status {
  color: var(--accent-success);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.stage-result-card.locked .result-status {
  color: var(--accent-warning);
}
.osint-hint-chip {
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent-warning) 45%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-warning) 14%, transparent);
  color: var(--accent-warning);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  cursor: pointer;
  white-space: nowrap;
}
.osint-hint-chip:hover {
  background: color-mix(in srgb, var(--accent-warning) 22%, transparent);
}

/* route buttons */
#routeButtons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
#routeButtons button {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  cursor: pointer;
}
#routeButtons button:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}
#routeButtons button.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
  font-weight: var(--font-semibold);
}
#routeButtons button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* stage results */
#stageResults {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stage-result-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}
.stage-result-card .result-name {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-size: var(--text-sm);
  min-width: 140px;
  flex-shrink: 0;
}
.stage-result-card .result-category {
  color: var(--text-muted);
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.stage-result-card .result-rationale {
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.stage-result-card .result-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* trail */
#trailArea {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.osint-clear-btn {
  align-self: flex-end;
  margin-top: -28px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: var(--accent-error);
  font-size: var(--text-xs);
  font-family: var(--font-ui);
  cursor: pointer;
}
.osint-clear-btn:hover {
  text-decoration: underline;
}
#reportTrail {
  display: flex;
  flex-direction: column;
}
.trail-entry {
  padding: var(--space-1) 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
}
.trail-entry:last-child {
  border-bottom: 0;
}
.trail-entry .trail-remove {
  float: right;
  background: none;
  border: 0;
  color: var(--accent-error);
  cursor: pointer;
  font-size: var(--text-xs);
  font-family: var(--font-ui);
  padding: 0 4px;
  border-radius: var(--radius-sm);
}
.trail-entry .trail-remove:hover {
  background: color-mix(in srgb, var(--accent-error) 15%, transparent);
}

/* empty state */
.empty-state {
  padding: var(--space-3) 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.empty-state p {
  margin: 0;
}

@media (max-width: 780px) {
  .osint-field-grid {
    grid-template-columns: 1fr;
  }
  .stage-result-card {
    flex-wrap: wrap;
  }
  .stage-result-card .result-name {
    min-width: auto;
  }
  .stage-result-card .result-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
